Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

power: supply: Drop explicit initialization of struct i2c_device_id::driver_data to 0

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>

authored by

Uwe Kleine-König and committed by
Sebastian Reichel
ebacfa1f 1613e604

+20 -20
+1 -1
drivers/power/supply/adp5061.c
··· 727 727 } 728 728 729 729 static const struct i2c_device_id adp5061_id[] = { 730 - { "adp5061", 0}, 730 + { "adp5061" }, 731 731 { } 732 732 }; 733 733 MODULE_DEVICE_TABLE(i2c, adp5061_id);
+1 -1
drivers/power/supply/bq24735-charger.c
··· 489 489 } 490 490 491 491 static const struct i2c_device_id bq24735_charger_id[] = { 492 - { "bq24735-charger", 0 }, 492 + { "bq24735-charger" }, 493 493 {} 494 494 }; 495 495 MODULE_DEVICE_TABLE(i2c, bq24735_charger_id);
+5 -5
drivers/power/supply/bq25890_charger.c
··· 1617 1617 }; 1618 1618 1619 1619 static const struct i2c_device_id bq25890_i2c_ids[] = { 1620 - { "bq25890", 0 }, 1621 - { "bq25892", 0 }, 1622 - { "bq25895", 0 }, 1623 - { "bq25896", 0 }, 1624 - {}, 1620 + { "bq25890" }, 1621 + { "bq25892" }, 1622 + { "bq25895" }, 1623 + { "bq25896" }, 1624 + {} 1625 1625 }; 1626 1626 MODULE_DEVICE_TABLE(i2c, bq25890_i2c_ids); 1627 1627
+1 -1
drivers/power/supply/cw2015_battery.c
··· 731 731 static SIMPLE_DEV_PM_OPS(cw_bat_pm_ops, cw_bat_suspend, cw_bat_resume); 732 732 733 733 static const struct i2c_device_id cw_bat_id_table[] = { 734 - { "cw2015", 0 }, 734 + { "cw2015" }, 735 735 { } 736 736 }; 737 737
+1 -1
drivers/power/supply/lp8727_charger.c
··· 584 584 MODULE_DEVICE_TABLE(of, lp8727_dt_ids); 585 585 586 586 static const struct i2c_device_id lp8727_ids[] = { 587 - {"lp8727", 0}, 587 + { "lp8727" }, 588 588 { } 589 589 }; 590 590 MODULE_DEVICE_TABLE(i2c, lp8727_ids);
+2 -2
drivers/power/supply/ltc4162-l-charger.c
··· 903 903 } 904 904 905 905 static const struct i2c_device_id ltc4162l_i2c_id_table[] = { 906 - { "ltc4162-l", 0 }, 907 - { }, 906 + { "ltc4162-l" }, 907 + { } 908 908 }; 909 909 MODULE_DEVICE_TABLE(i2c, ltc4162l_i2c_id_table); 910 910
+1 -1
drivers/power/supply/max14656_charger_detector.c
··· 300 300 } 301 301 302 302 static const struct i2c_device_id max14656_id[] = { 303 - { "max14656", 0 }, 303 + { "max14656" }, 304 304 {} 305 305 }; 306 306 MODULE_DEVICE_TABLE(i2c, max14656_id);
+2 -2
drivers/power/supply/max77976_charger.c
··· 483 483 } 484 484 485 485 static const struct i2c_device_id max77976_i2c_id[] = { 486 - { MAX77976_DRIVER_NAME, 0 }, 487 - { }, 486 + { MAX77976_DRIVER_NAME }, 487 + { } 488 488 }; 489 489 MODULE_DEVICE_TABLE(i2c, max77976_i2c_id); 490 490
+1 -1
drivers/power/supply/mm8013.c
··· 284 284 } 285 285 286 286 static const struct i2c_device_id mm8013_id_table[] = { 287 - { "mm8013", 0 }, 287 + { "mm8013" }, 288 288 {} 289 289 }; 290 290 MODULE_DEVICE_TABLE(i2c, mm8013_id_table);
+2 -2
drivers/power/supply/rt9455_charger.c
··· 1718 1718 } 1719 1719 1720 1720 static const struct i2c_device_id rt9455_i2c_id_table[] = { 1721 - { RT9455_DRIVER_NAME, 0 }, 1722 - { }, 1721 + { RT9455_DRIVER_NAME }, 1722 + { } 1723 1723 }; 1724 1724 MODULE_DEVICE_TABLE(i2c, rt9455_i2c_id_table); 1725 1725
+1 -1
drivers/power/supply/sbs-charger.c
··· 234 234 #endif 235 235 236 236 static const struct i2c_device_id sbs_id[] = { 237 - { "sbs-charger", 0 }, 237 + { "sbs-charger" }, 238 238 { } 239 239 }; 240 240 MODULE_DEVICE_TABLE(i2c, sbs_id);
+2 -2
drivers/power/supply/sbs-manager.c
··· 389 389 } 390 390 391 391 static const struct i2c_device_id sbsm_ids[] = { 392 - { "sbs-manager", 0 }, 393 - { "ltc1760", 0 }, 392 + { "sbs-manager" }, 393 + { "ltc1760" }, 394 394 { } 395 395 }; 396 396 MODULE_DEVICE_TABLE(i2c, sbsm_ids);