Skip to content

Commit ebacfa1

Browse files
Uwe Kleine-Königsre
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 1613e60 commit ebacfa1

12 files changed

+20
-20
lines changed

drivers/power/supply/adp5061.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ static int adp5061_probe(struct i2c_client *client)
727727
}
728728

729729
static const struct i2c_device_id adp5061_id[] = {
730-
{ "adp5061", 0},
730+
{ "adp5061" },
731731
{ }
732732
};
733733
MODULE_DEVICE_TABLE(i2c, adp5061_id);

drivers/power/supply/bq24735-charger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ static int bq24735_charger_probe(struct i2c_client *client)
489489
}
490490

491491
static const struct i2c_device_id bq24735_charger_id[] = {
492-
{ "bq24735-charger", 0 },
492+
{ "bq24735-charger" },
493493
{}
494494
};
495495
MODULE_DEVICE_TABLE(i2c, bq24735_charger_id);

drivers/power/supply/bq25890_charger.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,11 +1617,11 @@ static const struct dev_pm_ops bq25890_pm = {
16171617
};
16181618

16191619
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+
{}
16251625
};
16261626
MODULE_DEVICE_TABLE(i2c, bq25890_i2c_ids);
16271627

drivers/power/supply/cw2015_battery.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ static int __maybe_unused cw_bat_resume(struct device *dev)
731731
static SIMPLE_DEV_PM_OPS(cw_bat_pm_ops, cw_bat_suspend, cw_bat_resume);
732732

733733
static const struct i2c_device_id cw_bat_id_table[] = {
734-
{ "cw2015", 0 },
734+
{ "cw2015" },
735735
{ }
736736
};
737737

drivers/power/supply/lp8727_charger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ static const struct of_device_id lp8727_dt_ids[] __maybe_unused = {
584584
MODULE_DEVICE_TABLE(of, lp8727_dt_ids);
585585

586586
static const struct i2c_device_id lp8727_ids[] = {
587-
{"lp8727", 0},
587+
{ "lp8727" },
588588
{ }
589589
};
590590
MODULE_DEVICE_TABLE(i2c, lp8727_ids);

drivers/power/supply/ltc4162-l-charger.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,8 +903,8 @@ static void ltc4162l_alert(struct i2c_client *client,
903903
}
904904

905905
static const struct i2c_device_id ltc4162l_i2c_id_table[] = {
906-
{ "ltc4162-l", 0 },
907-
{ },
906+
{ "ltc4162-l" },
907+
{ }
908908
};
909909
MODULE_DEVICE_TABLE(i2c, ltc4162l_i2c_id_table);
910910

drivers/power/supply/max14656_charger_detector.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ static int max14656_probe(struct i2c_client *client)
300300
}
301301

302302
static const struct i2c_device_id max14656_id[] = {
303-
{ "max14656", 0 },
303+
{ "max14656" },
304304
{}
305305
};
306306
MODULE_DEVICE_TABLE(i2c, max14656_id);

drivers/power/supply/max77976_charger.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,8 @@ static int max77976_probe(struct i2c_client *client)
483483
}
484484

485485
static const struct i2c_device_id max77976_i2c_id[] = {
486-
{ MAX77976_DRIVER_NAME, 0 },
487-
{ },
486+
{ MAX77976_DRIVER_NAME },
487+
{ }
488488
};
489489
MODULE_DEVICE_TABLE(i2c, max77976_i2c_id);
490490

drivers/power/supply/mm8013.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static int mm8013_probe(struct i2c_client *client)
284284
}
285285

286286
static const struct i2c_device_id mm8013_id_table[] = {
287-
{ "mm8013", 0 },
287+
{ "mm8013" },
288288
{}
289289
};
290290
MODULE_DEVICE_TABLE(i2c, mm8013_id_table);

drivers/power/supply/rt9455_charger.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,8 +1718,8 @@ static void rt9455_remove(struct i2c_client *client)
17181718
}
17191719

17201720
static const struct i2c_device_id rt9455_i2c_id_table[] = {
1721-
{ RT9455_DRIVER_NAME, 0 },
1722-
{ },
1721+
{ RT9455_DRIVER_NAME },
1722+
{ }
17231723
};
17241724
MODULE_DEVICE_TABLE(i2c, rt9455_i2c_id_table);
17251725

0 commit comments

Comments
 (0)