Skip to content

Commit 75a0e1e

Browse files
ukleineksre
authored andcommitted
power: Drop unused assignment of platform_device_id driver data
The driver explicitly set the .driver_data member of struct platform_device_id to zero without relying on that value. Drop this unused assignments. While touching this array unify spacing, use a named initializer for .name and drop trailing commas after the list terminators. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://patch.msgid.link/ba3589f74a12d86fb02ecb9fa2e89532188c22a0.1780048925.git.u.kleine-koenig@baylibre.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent 254f496 commit 75a0e1e

8 files changed

Lines changed: 13 additions & 13 deletions

File tree

drivers/power/reset/qemu-virt-ctrl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static int qemu_virt_ctrl_probe(struct platform_device *pdev)
103103
}
104104

105105
static const struct platform_device_id qemu_virt_ctrl_id[] = {
106-
{ "qemu-virt-ctrl", 0 },
106+
{ .name = "qemu-virt-ctrl" },
107107
{ }
108108
};
109109
MODULE_DEVICE_TABLE(platform, qemu_virt_ctrl_id);

drivers/power/supply/charger-manager.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,8 +1653,8 @@ static void charger_manager_remove(struct platform_device *pdev)
16531653
}
16541654

16551655
static const struct platform_device_id charger_manager_id[] = {
1656-
{ "charger-manager", 0 },
1657-
{ },
1656+
{ .name = "charger-manager" },
1657+
{ }
16581658
};
16591659
MODULE_DEVICE_TABLE(platform, charger_manager_id);
16601660

drivers/power/supply/cros_charge-control.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ static int cros_chctl_probe(struct platform_device *pdev)
320320
}
321321

322322
static const struct platform_device_id cros_chctl_id[] = {
323-
{ "cros-charge-control", 0 },
324-
{}
323+
{ .name = "cros-charge-control" },
324+
{ }
325325
};
326326

327327
static struct platform_driver cros_chctl_driver = {

drivers/power/supply/cros_peripheral_charger.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ static int __maybe_unused cros_pchg_resume(struct device *dev)
369369
static SIMPLE_DEV_PM_OPS(cros_pchg_pm_ops, NULL, cros_pchg_resume);
370370

371371
static const struct platform_device_id cros_pchg_id[] = {
372-
{ DRV_NAME, 0 },
373-
{}
372+
{ .name = DRV_NAME },
373+
{ }
374374
};
375375
MODULE_DEVICE_TABLE(platform, cros_pchg_id);
376376

drivers/power/supply/cros_usbpd-charger.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,8 @@ static SIMPLE_DEV_PM_OPS(cros_usbpd_charger_pm_ops, NULL,
707707
cros_usbpd_charger_resume);
708708

709709
static const struct platform_device_id cros_usbpd_charger_id[] = {
710-
{ DRV_NAME, 0 },
711-
{}
710+
{ .name = DRV_NAME },
711+
{ }
712712
};
713713
MODULE_DEVICE_TABLE(platform, cros_usbpd_charger_id);
714714

drivers/power/supply/max77693_charger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ static void max77693_charger_remove(struct platform_device *pdev)
788788
}
789789

790790
static const struct platform_device_id max77693_charger_id[] = {
791-
{ "max77693-charger", 0, },
791+
{ .name = "max77693-charger" },
792792
{ }
793793
};
794794
MODULE_DEVICE_TABLE(platform, max77693_charger_id);

drivers/power/supply/max8997_charger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static int max8997_battery_probe(struct platform_device *pdev)
268268
}
269269

270270
static const struct platform_device_id max8997_battery_id[] = {
271-
{ "max8997-battery", 0 },
271+
{ .name = "max8997-battery" },
272272
{ }
273273
};
274274
MODULE_DEVICE_TABLE(platform, max8997_battery_id);

drivers/power/supply/mt6360_charger.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,8 +841,8 @@ static const struct of_device_id __maybe_unused mt6360_charger_of_id[] = {
841841
MODULE_DEVICE_TABLE(of, mt6360_charger_of_id);
842842

843843
static const struct platform_device_id mt6360_charger_id[] = {
844-
{ "mt6360-chg", 0 },
845-
{},
844+
{ .name = "mt6360-chg" },
845+
{ }
846846
};
847847
MODULE_DEVICE_TABLE(platform, mt6360_charger_id);
848848

0 commit comments

Comments
 (0)