auxdisplay: img-ascii-lcd: Make container_of() no-op for struct linedisp
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 12 Feb 2024 17:01:34 +0000 (19:01 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 15 Feb 2024 11:24:53 +0000 (13:24 +0200)
Move embedded struct linedisp member to make container_of() no-op.

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/auxdisplay/img-ascii-lcd.c

index 56efda0..09014ad 100644 (file)
@@ -32,21 +32,21 @@ struct img_ascii_lcd_config {
 
 /**
  * struct img_ascii_lcd_ctx - Private data structure
+ * @linedisp: line display structure
  * @base: the base address of the LCD registers
  * @regmap: the regmap through which LCD registers are accessed
  * @offset: the offset within regmap to the start of the LCD registers
  * @cfg: pointer to the LCD model configuration
- * @linedisp: line display structure
  * @curr: the string currently displayed on the LCD
  */
 struct img_ascii_lcd_ctx {
+       struct linedisp linedisp;
        union {
                void __iomem *base;
                struct regmap *regmap;
        };
        u32 offset;
        const struct img_ascii_lcd_config *cfg;
-       struct linedisp linedisp;
        char curr[] __aligned(8);
 };