mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] auxdisplay: Drop explicit initialization of struct i2c_device_id::driver_data to 0
@ 2024-09-18 12:31 Uwe Kleine-König
  2024-09-30 13:12 ` Andy Shevchenko
  2024-09-30 13:17 ` Geert Uytterhoeven
  0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2024-09-18 12:31 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Robin van der Gracht, Geert Uytterhoeven, linux-kernel

These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 drivers/auxdisplay/ht16k33.c | 2 +-
 drivers/auxdisplay/lcd2s.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c
index 8a7034b41d50..b00012a556fb 100644
--- a/drivers/auxdisplay/ht16k33.c
+++ b/drivers/auxdisplay/ht16k33.c
@@ -747,7 +747,7 @@ static void ht16k33_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ht16k33_i2c_match[] = {
-	{ "ht16k33", 0 },
+	{ "ht16k33" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ht16k33_i2c_match);
diff --git a/drivers/auxdisplay/lcd2s.c b/drivers/auxdisplay/lcd2s.c
index 6422be0dfe20..a28daa4ffbf7 100644
--- a/drivers/auxdisplay/lcd2s.c
+++ b/drivers/auxdisplay/lcd2s.c
@@ -349,7 +349,7 @@ static void lcd2s_i2c_remove(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id lcd2s_i2c_id[] = {
-	{ "lcd2s", 0 },
+	{ "lcd2s" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, lcd2s_i2c_id);

base-commit: 55bcd2e0d04c1171d382badef1def1fd04ef66c5
-- 
2.45.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] auxdisplay: Drop explicit initialization of struct i2c_device_id::driver_data to 0
  2024-09-18 12:31 [PATCH] auxdisplay: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Uwe Kleine-König
@ 2024-09-30 13:12 ` Andy Shevchenko
  2024-09-30 13:17 ` Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2024-09-30 13:12 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Robin van der Gracht, Geert Uytterhoeven, linux-kernel

On Wed, Sep 18, 2024 at 02:31:50PM +0200, Uwe Kleine-König wrote:
> These drivers don't use the driver_data member of struct i2c_device_id,
> so don't explicitly initialize this member.
> 
> This prepares putting driver_data in an anonymous union which requires
> either no initialization or named designators. But it's also a nice
> cleanup on its own.

Pushed to my review and testing queue, thanks!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] auxdisplay: Drop explicit initialization of struct i2c_device_id::driver_data to 0
  2024-09-18 12:31 [PATCH] auxdisplay: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Uwe Kleine-König
  2024-09-30 13:12 ` Andy Shevchenko
@ 2024-09-30 13:17 ` Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2024-09-30 13:17 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Andy Shevchenko, Robin van der Gracht, linux-kernel

On Wed, Sep 18, 2024 at 2:32 PM Uwe Kleine-König
<u.kleine-koenig@baylibre.com> wrote:
> These drivers don't use the driver_data member of struct i2c_device_id,
> so don't explicitly initialize this member.
>
> This prepares putting driver_data in an anonymous union which requires
> either no initialization or named designators. But it's also a nice
> cleanup on its own.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-30 13:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-18 12:31 [PATCH] auxdisplay: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Uwe Kleine-König
2024-09-30 13:12 ` Andy Shevchenko
2024-09-30 13:17 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®