]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
misc: Drop explicit initialization of struct i2c_device_id::driver_data to 0
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Mon, 24 Jun 2024 12:51:01 +0000 (14:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2024 14:41:00 +0000 (16:41 +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.

While add it, also remove commas after the sentinel entries.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20240624125101.1242750-2-u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/apds9802als.c
drivers/misc/apds990x.c
drivers/misc/bh1770glc.c
drivers/misc/ds1682.c
drivers/misc/hmc6352.c
drivers/misc/ics932s401.c
drivers/misc/isl29003.c
drivers/misc/isl29020.c
drivers/misc/tsl2550.c

index 693f0e539f37a55d6ca12fa397c389c3a34a9e26..6db4db975b9a2db8c1cbc42c94865c02748dc1d8 100644 (file)
@@ -285,7 +285,7 @@ static UNIVERSAL_DEV_PM_OPS(apds9802als_pm_ops, apds9802als_suspend,
 #endif /* CONFIG_PM */
 
 static const struct i2c_device_id apds9802als_id[] = {
-       { DRIVER_NAME, 0 },
+       { DRIVER_NAME },
        { }
 };
 
index 5fb29ebbb4222d83768878f9c3e6bb286ccaca44..6d4edd69db126a3ae55bc63a4e7984b3e40cb324 100644 (file)
@@ -1253,7 +1253,7 @@ static int apds990x_runtime_resume(struct device *dev)
 #endif
 
 static const struct i2c_device_id apds990x_id[] = {
-       {"apds990x", 0 },
+       { "apds990x" },
        {}
 };
 
index e1048d6163064d98e09cce6ce3ca2beea58283c2..0c052b05ab6a9494e6f7a7cf84b34479145da6c6 100644 (file)
@@ -1361,8 +1361,8 @@ static int bh1770_runtime_resume(struct device *dev)
 #endif
 
 static const struct i2c_device_id bh1770_id[] = {
-       {"bh1770glc", 0 },
-       {"sfh7770", 0 },
+       { "bh1770glc" },
+       { "sfh7770" },
        {}
 };
 
index 5f8dcd0e384865ef97bf4b58764141ca158f52b8..4175df7ef0111f69ed8d4229b7ab50a3c3d7ad12 100644 (file)
@@ -271,7 +271,7 @@ static void ds1682_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ds1682_id[] = {
-       { "ds1682", 0 },
+       { "ds1682" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ds1682_id);
index 759eaeb64307cd38b4cb4d869a02356ea14f4220..ff92c6edff6b25d00295c05d2ae536767efe1a71 100644 (file)
@@ -121,7 +121,7 @@ static void hmc6352_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id hmc6352_id[] = {
-       { "hmc6352", 0 },
+       { "hmc6352" },
        { }
 };
 
index ee6296b9807823727db7a8d63608718481c8cb72..4cdb1087838fec0f6428a3d091b5dae6156267e8 100644 (file)
@@ -95,7 +95,7 @@ static int ics932s401_detect(struct i2c_client *client,
 static void ics932s401_remove(struct i2c_client *client);
 
 static const struct i2c_device_id ics932s401_id[] = {
-       { "ics932s401", 0 },
+       { "ics932s401" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ics932s401_id);
index ebf0635aee64a8d856ff496373d99c277cc7dd2a..9f26db467a81a30baef02840a63ab0b0b0f4b698 100644 (file)
@@ -449,7 +449,7 @@ static SIMPLE_DEV_PM_OPS(isl29003_pm_ops, isl29003_suspend, isl29003_resume);
 #endif /* CONFIG_PM_SLEEP */
 
 static const struct i2c_device_id isl29003_id[] = {
-       { "isl29003", 0 },
+       { "isl29003" },
        {}
 };
 MODULE_DEVICE_TABLE(i2c, isl29003_id);
index c5976fa8c825053b8d01a1fde81c9503f9e9713c..1643ba2ff9644d544996136727e6765ccc1da6d6 100644 (file)
@@ -177,7 +177,7 @@ static void isl29020_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id isl29020_id[] = {
-       { "isl29020", 0 },
+       { "isl29020" },
        { }
 };
 
index a3bc2823143ebc23e949eb32790580c1d87ae0c7..2ad4387c98374c2055c1a5ce60a0ee0379018c0b 100644 (file)
@@ -420,7 +420,7 @@ static SIMPLE_DEV_PM_OPS(tsl2550_pm_ops, tsl2550_suspend, tsl2550_resume);
 #endif /* CONFIG_PM_SLEEP */
 
 static const struct i2c_device_id tsl2550_id[] = {
-       { "tsl2550", 0 },
+       { "tsl2550" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, tsl2550_id);