power: supply: Drop explicit initialization of struct i2c_device_id::driver_data...
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 22 May 2024 16:48:31 +0000 (18:48 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 27 May 2024 16:47:11 +0000 (18: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.

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/20240522164830.61646-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
12 files changed:
drivers/power/supply/adp5061.c
drivers/power/supply/bq24735-charger.c
drivers/power/supply/bq25890_charger.c
drivers/power/supply/cw2015_battery.c
drivers/power/supply/lp8727_charger.c
drivers/power/supply/ltc4162-l-charger.c
drivers/power/supply/max14656_charger_detector.c
drivers/power/supply/max77976_charger.c
drivers/power/supply/mm8013.c
drivers/power/supply/rt9455_charger.c
drivers/power/supply/sbs-charger.c
drivers/power/supply/sbs-manager.c

index 3e3a0d118ce5a5f6427b9e1f70d14cf897f3c419..dac9875d993c9ccb8926055f824b8b851f3c0935 100644 (file)
@@ -727,7 +727,7 @@ static int adp5061_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id adp5061_id[] = {
-       { "adp5061", 0},
+       { "adp5061" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, adp5061_id);
index 8efceeae864c81beda3b8c62198ab2769c81cdee..73a7fc867b0344cd0305d3d4b29c0e85c361554f 100644 (file)
@@ -489,7 +489,7 @@ static int bq24735_charger_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id bq24735_charger_id[] = {
-       { "bq24735-charger", 0 },
+       { "bq24735-charger" },
        {}
 };
 MODULE_DEVICE_TABLE(i2c, bq24735_charger_id);
index 03fa11a1c9b63a97ad727a135560eee75a9c64f2..2f5ceaf00b94cd9e5eab40909bcff247035feb13 100644 (file)
@@ -1617,11 +1617,11 @@ static const struct dev_pm_ops bq25890_pm = {
 };
 
 static const struct i2c_device_id bq25890_i2c_ids[] = {
-       { "bq25890", 0 },
-       { "bq25892", 0 },
-       { "bq25895", 0 },
-       { "bq25896", 0 },
-       {},
+       { "bq25890" },
+       { "bq25892" },
+       { "bq25895" },
+       { "bq25896" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, bq25890_i2c_ids);
 
index 99f3ccdc30a6a77dc06ba6c7ba54ed47e7358b9c..f63c3c41045155bc2a2f99eed45ca9237d7db362 100644 (file)
@@ -731,7 +731,7 @@ static int __maybe_unused cw_bat_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(cw_bat_pm_ops, cw_bat_suspend, cw_bat_resume);
 
 static const struct i2c_device_id cw_bat_id_table[] = {
-       { "cw2015", 0 },
+       { "cw2015" },
        { }
 };
 
index 34548a4da90b28de31f8f95cbfbf5109400f9048..4186fcd375127ea0da83110e3c11524fc1182720 100644 (file)
@@ -584,7 +584,7 @@ static const struct of_device_id lp8727_dt_ids[] __maybe_unused = {
 MODULE_DEVICE_TABLE(of, lp8727_dt_ids);
 
 static const struct i2c_device_id lp8727_ids[] = {
-       {"lp8727", 0},
+       { "lp8727" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lp8727_ids);
index f0eace7314806c542e5e2eaf33d586da14ecdaed..2e4bc74e1c4a37cdb805c377c5cf6fb0426a0368 100644 (file)
@@ -903,8 +903,8 @@ static void ltc4162l_alert(struct i2c_client *client,
 }
 
 static const struct i2c_device_id ltc4162l_i2c_id_table[] = {
-       { "ltc4162-l", 0 },
-       { },
+       { "ltc4162-l" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, ltc4162l_i2c_id_table);
 
index 89f2af72dfcdc4d325c185977f7110aeaaf0fe70..a5b42b42d134e2d9b9ad95123389809c63a49cb8 100644 (file)
@@ -300,7 +300,7 @@ static int max14656_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id max14656_id[] = {
-       { "max14656", 0 },
+       { "max14656" },
        {}
 };
 MODULE_DEVICE_TABLE(i2c, max14656_id);
index 99659dc8f5a6df48e0e9bd26960f0e4448f41f34..d7e520da768864f7f7e5177195ec0a16a51724f5 100644 (file)
@@ -483,8 +483,8 @@ static int max77976_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id max77976_i2c_id[] = {
-       { MAX77976_DRIVER_NAME, 0 },
-       { },
+       { MAX77976_DRIVER_NAME },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, max77976_i2c_id);
 
index 20c1651ca38e03a0d05c8110307766e2ba45fe49..5bcfaeeda3db755e05a449cbfd6f0c72162b6890 100644 (file)
@@ -284,7 +284,7 @@ static int mm8013_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id mm8013_id_table[] = {
-       { "mm8013", 0 },
+       { "mm8013" },
        {}
 };
 MODULE_DEVICE_TABLE(i2c, mm8013_id_table);
index e4dbacd50a437df3562b04d485ec38e11a89b216..64a23e3d7bb00f03a548a551d3fd523299fd00cd 100644 (file)
@@ -1718,8 +1718,8 @@ static void rt9455_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id rt9455_i2c_id_table[] = {
-       { RT9455_DRIVER_NAME, 0 },
-       { },
+       { RT9455_DRIVER_NAME },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, rt9455_i2c_id_table);
 
index f4adde4492707b3a568a628fb94c512d506185b1..ab3f095d90ea7c1c599aea61acce9138c37a269a 100644 (file)
@@ -234,7 +234,7 @@ MODULE_DEVICE_TABLE(of, sbs_dt_ids);
 #endif
 
 static const struct i2c_device_id sbs_id[] = {
-       { "sbs-charger", 0 },
+       { "sbs-charger" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, sbs_id);
index 933b04806d10d82dc2f5080cfdd0e2ae4954f486..7d2f39f19acbf00d2d29850cd97063bb5f02eb3c 100644 (file)
@@ -389,8 +389,8 @@ static int sbsm_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id sbsm_ids[] = {
-       { "sbs-manager", 0 },
-       { "ltc1760",     0 },
+       { "sbs-manager" },
+       { "ltc1760" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, sbsm_ids);