]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
usb: typec: Drop explicit initialization of struct i2c_device_id::driver_data to 0
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Wed, 10 Jul 2024 07:30:50 +0000 (09:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jul 2024 11:57:40 +0000 (13:57 +0200)
These driver 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>
Link: https://lore.kernel.org/r/20240710073050.192806-2-u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/anx7411.c
drivers/usb/typec/tcpm/fusb302.c
drivers/usb/typec/tcpm/tcpci.c
drivers/usb/typec/tcpm/tcpci_maxim_core.c
drivers/usb/typec/ucsi/ucsi_ccg.c
drivers/usb/typec/ucsi/ucsi_stm32g0.c

index b12a07edc71bb5499b86b4200dad4552f33e3bf8..5a5bf3532ad7adc9fe42cb2ebf13e438b27bc2d8 100644 (file)
@@ -1566,7 +1566,7 @@ static void anx7411_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id anx7411_id[] = {
-       {"anx7411", 0},
+       { "anx7411" },
        {}
 };
 
index ef18a448b7406bbc4443e39cf75597454640f43b..e2fe479e16ada018930ea0dbbf58ee37ce9a1990 100644 (file)
@@ -1820,8 +1820,8 @@ static const struct of_device_id fusb302_dt_match[] __maybe_unused = {
 MODULE_DEVICE_TABLE(of, fusb302_dt_match);
 
 static const struct i2c_device_id fusb302_i2c_device_id[] = {
-       {"typec_fusb302", 0},
-       {},
+       { "typec_fusb302" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, fusb302_i2c_device_id);
 
index 8a18d561b063ba97163174998f6d41765be3c3f3..b862fdf3fe1d4c6c35ec60ad5eae8af84a002cad 100644 (file)
@@ -947,7 +947,7 @@ static void tcpci_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tcpci_id[] = {
-       { "tcpci", 0 },
+       { "tcpci" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, tcpci_id);
index eec3bcec119c1a8c207f0e0b5d9d128625758d70..760e2f92b958dc9c6057c1d2ccf989d63e40e3a4 100644 (file)
@@ -538,7 +538,7 @@ static void max_tcpci_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id max_tcpci_id[] = {
-       { "maxtcpc", 0 },
+       { "maxtcpc" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, max_tcpci_id);
index ba4db2310a050ffceed8f2beb31859e9fa1f006c..b3ec799fc8733717e03d7e672c9181be92255b67 100644 (file)
@@ -1501,7 +1501,7 @@ static const struct of_device_id ucsi_ccg_of_match_table[] = {
 MODULE_DEVICE_TABLE(of, ucsi_ccg_of_match_table);
 
 static const struct i2c_device_id ucsi_ccg_device_id[] = {
-       {"ccgx-ucsi", 0},
+       { "ccgx-ucsi" },
        {}
 };
 MODULE_DEVICE_TABLE(i2c, ucsi_ccg_device_id);
index d948c3f579e18fc5cf5d6bddc668ad21ad5c48bb..ddbec2b78c8e18f50ead7df5ff8f94c7d7fa67f6 100644 (file)
@@ -739,8 +739,8 @@ static const struct of_device_id __maybe_unused ucsi_stm32g0_typec_of_match[] =
 MODULE_DEVICE_TABLE(of, ucsi_stm32g0_typec_of_match);
 
 static const struct i2c_device_id ucsi_stm32g0_typec_i2c_devid[] = {
-       {"stm32g0-typec", 0},
-       {},
+       { "stm32g0-typec" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, ucsi_stm32g0_typec_i2c_devid);