Named initializers are better readable and more robust to changes of the
struct definition. This robustness is relevant for a planned change to
struct platform_device_id replacing .driver_data by an anonymous union.
While touching these arrays unify spacing and usage of commas.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Joshua Peisach <jpeisach@ubuntu.com>
Link: https://patch.msgid.link/1ceacf4f9c3f827bcad85b378aa04cdca1c04635.1780048925.git.u.kleine-koenig@baylibre.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
}
static const struct platform_device_id spacemit_p1_reboot_id_table[] = {
- { "spacemit-p1-reboot", },
- { /* sentinel */ },
+ { .name = "spacemit-p1-reboot" },
+ { /* sentinel */ }
};
MODULE_DEVICE_TABLE(platform, spacemit_p1_reboot_id_table);
}
static const struct platform_device_id tps65086_restart_id_table[] = {
- { "tps65086-reset", },
+ { .name = "tps65086-reset" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(platform, tps65086_restart_id_table);
}
static const struct platform_device_id bd71828_charger_id[] = {
- { "bd71815-power", ROHM_CHIP_TYPE_BD71815 },
- { "bd71828-power", ROHM_CHIP_TYPE_BD71828 },
- { "bd72720-power", ROHM_CHIP_TYPE_BD72720 },
- { },
+ { .name = "bd71815-power", .driver_data = ROHM_CHIP_TYPE_BD71815 },
+ { .name = "bd71828-power", .driver_data = ROHM_CHIP_TYPE_BD71828 },
+ { .name = "bd72720-power", .driver_data = ROHM_CHIP_TYPE_BD72720 },
+ { }
};
MODULE_DEVICE_TABLE(platform, bd71828_charger_id);
}
static const struct platform_device_id macsmc_power_id[] = {
- { "macsmc-power" },
+ { .name = "macsmc-power" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(platform, macsmc_power_id);
}
static const struct platform_device_id max77759_charger_id[] = {
- { .name = "max77759-charger", },
+ { .name = "max77759-charger" },
{ }
};
MODULE_DEVICE_TABLE(platform, max77759_charger_id);
}
static const struct platform_device_id max8998_battery_id[] = {
- { "max8998-battery", TYPE_MAX8998 },
+ { .name = "max8998-battery" },
{ }
};
MODULE_DEVICE_TABLE(platform, max8998_battery_id);
}
static const struct platform_device_id pf1550_charger_id[] = {
- { "pf1550-charger", },
+ { .name = "pf1550-charger" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(platform, pf1550_charger_id);
}
static const struct platform_device_id rt5033_charger_id[] = {
- { "rt5033-charger", },
+ { .name = "rt5033-charger" },
{ }
};
MODULE_DEVICE_TABLE(platform, rt5033_charger_id);