]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
eeprom: Drop explicit initialization of struct i2c_device_id::driver_data to 0
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 10 May 2024 21:14:54 +0000 (23:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2024 15:47:27 +0000 (17:47 +0200)
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@pengutronix.de>
Link: https://lore.kernel.org/r/20240510211454.2274614-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/eeprom/ee1004.c
drivers/misc/eeprom/idt_89hpesx.c
drivers/misc/eeprom/max6875.c

index 21feebc3044c34b60f29571cbd65159a4106a735..bf4f65dc6d9ab44088d06a2d79b7f6604650eb6e 100644 (file)
@@ -52,7 +52,7 @@ static struct ee1004_bus_data {
 } ee1004_bus_data[EE1004_MAX_BUSSES];
 
 static const struct i2c_device_id ee1004_ids[] = {
-       { "ee1004", 0 },
+       { "ee1004" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ee1004_ids);
index 327afb866b218adc441e5ba62c816e269286d8a4..43421fe37d338874ff1c2949497c64ebf0143106 100644 (file)
@@ -1426,58 +1426,58 @@ MODULE_DEVICE_TABLE(i2c, ee_ids);
  * idt_ids - supported IDT 89HPESx devices
  */
 static const struct i2c_device_id idt_ids[] = {
-       { "89hpes8nt2", 0 },
-       { "89hpes12nt3", 0 },
-
-       { "89hpes24nt6ag2", 0 },
-       { "89hpes32nt8ag2", 0 },
-       { "89hpes32nt8bg2", 0 },
-       { "89hpes12nt12g2", 0 },
-       { "89hpes16nt16g2", 0 },
-       { "89hpes24nt24g2", 0 },
-       { "89hpes32nt24ag2", 0 },
-       { "89hpes32nt24bg2", 0 },
-
-       { "89hpes12n3", 0 },
-       { "89hpes12n3a", 0 },
-       { "89hpes24n3", 0 },
-       { "89hpes24n3a", 0 },
-
-       { "89hpes32h8", 0 },
-       { "89hpes32h8g2", 0 },
-       { "89hpes48h12", 0 },
-       { "89hpes48h12g2", 0 },
-       { "89hpes48h12ag2", 0 },
-       { "89hpes16h16", 0 },
-       { "89hpes22h16", 0 },
-       { "89hpes22h16g2", 0 },
-       { "89hpes34h16", 0 },
-       { "89hpes34h16g2", 0 },
-       { "89hpes64h16", 0 },
-       { "89hpes64h16g2", 0 },
-       { "89hpes64h16ag2", 0 },
-
-       /* { "89hpes3t3", 0 }, // No SMBus-slave iface */
-       { "89hpes12t3g2", 0 },
-       { "89hpes24t3g2", 0 },
-       /* { "89hpes4t4", 0 }, // No SMBus-slave iface */
-       { "89hpes16t4", 0 },
-       { "89hpes4t4g2", 0 },
-       { "89hpes10t4g2", 0 },
-       { "89hpes16t4g2", 0 },
-       { "89hpes16t4ag2", 0 },
-       { "89hpes5t5", 0 },
-       { "89hpes6t5", 0 },
-       { "89hpes8t5", 0 },
-       { "89hpes8t5a", 0 },
-       { "89hpes24t6", 0 },
-       { "89hpes6t6g2", 0 },
-       { "89hpes24t6g2", 0 },
-       { "89hpes16t7", 0 },
-       { "89hpes32t8", 0 },
-       { "89hpes32t8g2", 0 },
-       { "89hpes48t12", 0 },
-       { "89hpes48t12g2", 0 },
+       { "89hpes8nt2" },
+       { "89hpes12nt3" },
+
+       { "89hpes24nt6ag2" },
+       { "89hpes32nt8ag2" },
+       { "89hpes32nt8bg2" },
+       { "89hpes12nt12g2" },
+       { "89hpes16nt16g2" },
+       { "89hpes24nt24g2" },
+       { "89hpes32nt24ag2" },
+       { "89hpes32nt24bg2" },
+
+       { "89hpes12n3" },
+       { "89hpes12n3a" },
+       { "89hpes24n3" },
+       { "89hpes24n3a" },
+
+       { "89hpes32h8" },
+       { "89hpes32h8g2" },
+       { "89hpes48h12" },
+       { "89hpes48h12g2" },
+       { "89hpes48h12ag2" },
+       { "89hpes16h16" },
+       { "89hpes22h16" },
+       { "89hpes22h16g2" },
+       { "89hpes34h16" },
+       { "89hpes34h16g2" },
+       { "89hpes64h16" },
+       { "89hpes64h16g2" },
+       { "89hpes64h16ag2" },
+
+       /* { "89hpes3t3" }, // No SMBus-slave iface */
+       { "89hpes12t3g2" },
+       { "89hpes24t3g2" },
+       /* { "89hpes4t4" }, // No SMBus-slave iface */
+       { "89hpes16t4" },
+       { "89hpes4t4g2" },
+       { "89hpes10t4g2" },
+       { "89hpes16t4g2" },
+       { "89hpes16t4ag2" },
+       { "89hpes5t5" },
+       { "89hpes6t5" },
+       { "89hpes8t5" },
+       { "89hpes8t5a" },
+       { "89hpes24t6" },
+       { "89hpes6t6g2" },
+       { "89hpes24t6g2" },
+       { "89hpes16t7" },
+       { "89hpes32t8" },
+       { "89hpes32t8g2" },
+       { "89hpes48t12" },
+       { "89hpes48t12g2" },
        { /* END OF LIST */ }
 };
 MODULE_DEVICE_TABLE(i2c, idt_ids);
index cb6b1efeafe0fe86416be16bd57bdc8424d3b7de..6fab2ffa736b741593931c413f230d7c43b5b8dd 100644 (file)
@@ -183,7 +183,7 @@ static void max6875_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id max6875_id[] = {
-       { "max6875", 0 },
+       { "max6875" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, max6875_id);