]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mfd: 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:10:11 +0000 (23:10 +0200)
committerLee Jones <lee@kernel.org>
Thu, 4 Jul 2024 16:08:02 +0000 (17:08 +0100)
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@pengutronix.de>
Link: https://lore.kernel.org/r/20240510211011.2273978-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones <lee@kernel.org>
29 files changed:
drivers/mfd/88pm800.c
drivers/mfd/88pm805.c
drivers/mfd/88pm860x-core.c
drivers/mfd/aat2870-core.c
drivers/mfd/act8945a.c
drivers/mfd/as3722.c
drivers/mfd/axp20x-i2c.c
drivers/mfd/bd9571mwv.c
drivers/mfd/da9055-i2c.c
drivers/mfd/lm3533-core.c
drivers/mfd/lp3943.c
drivers/mfd/lp873x.c
drivers/mfd/lp87565.c
drivers/mfd/lp8788.c
drivers/mfd/max8907.c
drivers/mfd/max8925-i2c.c
drivers/mfd/menelaus.c
drivers/mfd/retu-mfd.c
drivers/mfd/stw481x.c
drivers/mfd/tps6105x.c
drivers/mfd/tps6507x.c
drivers/mfd/tps65086.c
drivers/mfd/tps65090.c
drivers/mfd/tps6586x.c
drivers/mfd/tps65912-i2c.c
drivers/mfd/twl6040.c
drivers/mfd/wl1273-core.c
drivers/mfd/wm8350-i2c.c
drivers/mfd/wm8400-core.c

index 300caa0673352e8777f7fde183bc916c49fc13b7..384ecf5301d25de87fa1955bb3d2dbf4a822b252 100644 (file)
@@ -116,7 +116,7 @@ enum {
 #define PM800_CHIP_GEN_ID_NUM  0x3
 
 static const struct i2c_device_id pm80x_id_table[] = {
-       {"88PM800", 0},
+       { "88PM800" },
        {} /* NULL terminated */
 };
 MODULE_DEVICE_TABLE(i2c, pm80x_id_table);
index 68417c3c4f5ae4a78ae1d3702c91c49821efee48..205f0762a9287651348777602727e6bf1f0aa981 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/delay.h>
 
 static const struct i2c_device_id pm80x_id_table[] = {
-       {"88PM805", 0},
+       { "88PM805" },
        {} /* NULL terminated */
 };
 MODULE_DEVICE_TABLE(i2c, pm80x_id_table);
index 151bf03e772d161d80f62f9981573a1b3c8a49dd..7f003f71e1af114124c7848ce49f5b4bf515d1bf 100644 (file)
@@ -1233,7 +1233,7 @@ static int pm860x_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(pm860x_pm_ops, pm860x_suspend, pm860x_resume);
 
 static const struct i2c_device_id pm860x_id_table[] = {
-       { "88PM860x", 0 },
+       { "88PM860x" },
        {}
 };
 MODULE_DEVICE_TABLE(i2c, pm860x_id_table);
index 2fee62f1016c800701c09ab49b67ce7cdbb33b63..8ef510e84688b6105f8b5ed3d69ad57e6e41b4fa 100644 (file)
@@ -439,7 +439,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(aat2870_pm_ops, aat2870_i2c_suspend,
                                aat2870_i2c_resume);
 
 static const struct i2c_device_id aat2870_i2c_id_table[] = {
-       { "aat2870", 0 },
+       { "aat2870" },
        { }
 };
 
index 4e32ac3d573e860639f6d616f8569b5c8c33b3cb..cafefb4451cb92ba53dfaa6d4e2f537d641947c0 100644 (file)
@@ -54,7 +54,7 @@ static int act8945a_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id act8945a_i2c_id[] = {
-       { "act8945a", 0 },
+       { "act8945a" },
        {}
 };
 MODULE_DEVICE_TABLE(i2c, act8945a_i2c_id);
index bec047bdd088481fb9c1d0ebe99c7fd5e0a3c310..6c0d89b0c7e3faa2f82a265df245c6abc6617e48 100644 (file)
@@ -430,8 +430,8 @@ static const struct of_device_id as3722_of_match[] = {
 MODULE_DEVICE_TABLE(of, as3722_of_match);
 
 static const struct i2c_device_id as3722_i2c_id[] = {
-       { "as3722", 0 },
-       {},
+       { "as3722" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, as3722_i2c_id);
 
index b8e7ac89f6976f40fbb845b557caf664fa722466..791a0b4cb64bb709785649169e63ea8a086f889a 100644 (file)
@@ -75,18 +75,18 @@ MODULE_DEVICE_TABLE(of, axp20x_i2c_of_match);
 #endif
 
 static const struct i2c_device_id axp20x_i2c_id[] = {
-       { "axp152", 0 },
-       { "axp192", 0 },
-       { "axp202", 0 },
-       { "axp209", 0 },
-       { "axp221", 0 },
-       { "axp223", 0 },
-       { "axp313a", 0 },
-       { "axp717", 0 },
-       { "axp803", 0 },
-       { "axp806", 0 },
-       { "axp15060", 0 },
-       { },
+       { "axp152" },
+       { "axp192" },
+       { "axp202" },
+       { "axp209" },
+       { "axp221" },
+       { "axp223" },
+       { "axp313a" },
+       { "axp717" },
+       { "axp803" },
+       { "axp806" },
+       { "axp15060" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, axp20x_i2c_id);
 
index 0a955178d4697478e1b8d95c6771fc11a057bb1f..e7c2ac74d9988877f16a9eeded7fd07213caf90d 100644 (file)
@@ -268,7 +268,7 @@ static const struct of_device_id bd9571mwv_of_match_table[] = {
 MODULE_DEVICE_TABLE(of, bd9571mwv_of_match_table);
 
 static const struct i2c_device_id bd9571mwv_id_table[] = {
-       { "bd9571mwv", 0 },
+       { "bd9571mwv" },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, bd9571mwv_id_table);
index 9a5f51b60badac351c35f1a8a075eb4d6c4a0edc..6c1981832aafe9dca27452bc4b741cf6f947b984 100644 (file)
@@ -54,7 +54,7 @@ static void da9055_i2c_remove(struct i2c_client *i2c)
  * and CODEC, which must be different to operate together.
  */
 static const struct i2c_device_id da9055_i2c_id[] = {
-       {"da9055-pmic", 0},
+       { "da9055-pmic" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
index c211183cecb242ea9243c30b261a7c0eb5906586..c1219e608c5ff7b22ef255e862bb6c363403cd2c 100644 (file)
@@ -614,8 +614,8 @@ static void lm3533_i2c_remove(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id lm3533_i2c_ids[] = {
-       { "lm3533", 0 },
-       { },
+       { "lm3533" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, lm3533_i2c_ids);
 
index 7f749a23dca84f4567c401d74e3bea46f5ad05ce..6764553147e4686aacdddcc522d403a0be25672e 100644 (file)
@@ -126,7 +126,7 @@ static int lp3943_probe(struct i2c_client *cl)
 }
 
 static const struct i2c_device_id lp3943_ids[] = {
-       { "lp3943", 0 },
+       { "lp3943" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lp3943_ids);
index de7ab7aed3c6c1c2f128dcd2bc604578ba566d4f..e8c5c89c2a76a7ef20e0fd8cc20813bc3f7e6f92 100644 (file)
@@ -68,8 +68,8 @@ static const struct of_device_id of_lp873x_match_table[] = {
 MODULE_DEVICE_TABLE(of, of_lp873x_match_table);
 
 static const struct i2c_device_id lp873x_id_table[] = {
-       { "lp873x", 0 },
-       { },
+       { "lp873x" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, lp873x_id_table);
 
index 08c62ddfb4f505ea6e279e352fec18fedc097d11..9488d3793c104a4c28c76d325fa4c92b26afd342 100644 (file)
@@ -106,8 +106,8 @@ static void lp87565_shutdown(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lp87565_id_table[] = {
-       { "lp87565-q1", 0 },
-       { },
+       { "lp87565-q1" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, lp87565_id_table);
 
index f371eeb042e031ea699a12261ec1504ca60af8eb..32f255378f5a694e5d3d6feefbd1936686f29167 100644 (file)
@@ -216,7 +216,7 @@ static void lp8788_remove(struct i2c_client *cl)
 }
 
 static const struct i2c_device_id lp8788_ids[] = {
-       {"lp8788", 0},
+       { "lp8788" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lp8788_ids);
index accf426234b66bc35296700d51d4e18659b12f2f..7bac1d6517717ff3dc893dd3a703e5629b45b179 100644 (file)
@@ -300,7 +300,7 @@ MODULE_DEVICE_TABLE(of, max8907_of_match);
 #endif
 
 static const struct i2c_device_id max8907_i2c_id[] = {
-       {"max8907", 0},
+       { "max8907" },
        {}
 };
 MODULE_DEVICE_TABLE(i2c, max8907_i2c_id);
index 7608000488f950529e7876e514d8478474b4bca6..556aea7ec0a0473edc9291cae0c82fe9b4ecb346 100644 (file)
@@ -127,8 +127,8 @@ EXPORT_SYMBOL(max8925_set_bits);
 
 
 static const struct i2c_device_id max8925_id_table[] = {
-       { "max8925", 0 },
-       { },
+       { "max8925" },
+       { }
 };
 
 static int max8925_dt_init(struct device_node *np, struct device *dev,
index 787b9c2f3804c9a66621bfc5c1668728c8d5f5c9..a125d40fa121b45c9a5bc0455deb466f6985bf4d 100644 (file)
@@ -1230,7 +1230,7 @@ static void menelaus_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id menelaus_id[] = {
-       { "menelaus", 0 },
+       { "menelaus" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, menelaus_id);
index b50cfa7f4b8f4d7caedbe5fb53e1cd247c6e19f2..9184e553fafdde6d5f2c57196a90d15886171e2e 100644 (file)
@@ -300,8 +300,8 @@ static void retu_remove(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id retu_id[] = {
-       { "retu", 0 },
-       { "tahvo", 0 },
+       { "retu" },
+       { "tahvo" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, retu_id);
index f35c3af680ddc1a6b605d9e90e2ff3e5bafca17e..5ed64d53c23d0600ce2520556ae734640581c525 100644 (file)
@@ -222,8 +222,8 @@ static int stw481x_probe(struct i2c_client *client)
  * the structure of the I2C core.
  */
 static const struct i2c_device_id stw481x_id[] = {
-       { "stw481x", 0 },
-       { },
+       { "stw481x" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, stw481x_id);
 
index 5601f6d0d874c8f4c7eec52b21a1ca5555f4add3..0da1cecb5af6a9f7e24f90433c419bbc4aaf66bb 100644 (file)
@@ -191,8 +191,8 @@ static void tps6105x_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tps6105x_id[] = {
-       { "tps61050", 0 },
-       { "tps61052", 0 },
+       { "tps61050" },
+       { "tps61052" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, tps6105x_id);
index 95dafb0e9f00c446dab201486d2e89622ecc0cea..9865512dc7ccf2096a82e4e3dd9de79718583975 100644 (file)
@@ -103,7 +103,7 @@ static int tps6507x_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id tps6507x_i2c_id[] = {
-       { "tps6507x", 0 },
+       { "tps6507x" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, tps6507x_i2c_id);
index fdce81b33f603804ca2a0100a898dc66351fbe01..5ef0a7e0d61d8c6f142e62f0703423a66c00f9b6 100644 (file)
@@ -127,7 +127,7 @@ static void tps65086_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tps65086_id_table[] = {
-       { "tps65086", 0 },
+       { "tps65086" },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, tps65086_id_table);
index b764badaa62a4394f2cf18ce8391cae750af0e1b..b82cd484ac857a31f23be9344d244e0f1eae3bd8 100644 (file)
@@ -225,8 +225,8 @@ err_irq_exit:
 
 
 static const struct i2c_device_id tps65090_id_table[] = {
-       { "tps65090", 0 },
-       { },
+       { "tps65090" },
+       { }
 };
 
 static struct i2c_driver tps65090_driver = {
index 03c65bbf2143898b9736b35af448087bc212c3c4..82714899efb2c39b60c6ffb1a00590d9bb244461 100644 (file)
@@ -642,8 +642,8 @@ static SIMPLE_DEV_PM_OPS(tps6586x_pm_ops, tps6586x_i2c_suspend,
                         tps6586x_i2c_resume);
 
 static const struct i2c_device_id tps6586x_id_table[] = {
-       { "tps6586x", 0 },
-       { },
+       { "tps6586x" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, tps6586x_id_table);
 
index 3c5ac781b6c16d68151ea6020bebd64b71601a1c..3cc1bc68be7c3ef23c0223e8bba1a3b8cd4d1b2d 100644 (file)
@@ -50,7 +50,7 @@ static void tps65912_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tps65912_i2c_id_table[] = {
-       { "tps65912", 0 },
+       { "tps65912" },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, tps65912_i2c_id_table);
index 9ce34dfd99b331a2f9d4992f6db0164dfc25c5b9..c184e8bfab7c8f1a11950d1616741de46b7d5d48 100644 (file)
@@ -817,9 +817,9 @@ static void twl6040_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id twl6040_i2c_id[] = {
-       { "twl6040", 0, },
-       { "twl6041", 0, },
-       { },
+       { "twl6040" },
+       { "twl6041" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, twl6040_i2c_id);
 
index e2a7fccaed016bb5b248a801f4f8e6e86c2574a8..2f185e93318ee50436caff7a7b99f922a3d9cbb8 100644 (file)
@@ -13,7 +13,7 @@
 #define DRIVER_DESC "WL1273 FM Radio Core"
 
 static const struct i2c_device_id wl1273_driver_id_table[] = {
-       { WL1273_FM_DRIVER_NAME, 0 },
+       { WL1273_FM_DRIVER_NAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, wl1273_driver_id_table);
index c2a7d7069975272bb9965f84a2d013985033557a..767c176b12a77bfe7c2fd45a4056736102abc15b 100644 (file)
@@ -41,9 +41,9 @@ static int wm8350_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8350_i2c_id[] = {
-       { "wm8350", 0 },
-       { "wm8351", 0 },
-       { "wm8352", 0 },
+       { "wm8350" },
+       { "wm8351" },
+       { "wm8352" },
        { }
 };
 
index ddfb234849dd11720c063dde57e35bb55f5b7fe5..8ecfe878a5ba49e4835ec4c584d574bfa7251fa5 100644 (file)
@@ -135,7 +135,7 @@ static int wm8400_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8400_i2c_id[] = {
-       { "wm8400", 0 },
+       { "wm8400" },
        { }
 };