* [PATCH v1 1/6] power: Drop unused assignment of platform_device_id driver data
2026-05-29 10:18 [PATCH v1 0/6] power: Use named initializers for platform_device_id arrays Uwe Kleine-König (The Capable Hub)
@ 2026-05-29 10:18 ` Uwe Kleine-König (The Capable Hub)
2026-05-29 22:02 ` Tzung-Bi Shih
2026-05-29 10:18 ` [PATCH v1 4/6] power: Use named initializers for platform_device_id arrays Uwe Kleine-König (The Capable Hub)
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-05-29 10:18 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Kuan-Wei Chiu, Benson Leung, Guenter Roeck, Thomas Weißschuh,
Krzysztof Kozlowski, Matthias Brugger, AngeloGioacchino Del Regno,
linux-pm, linux-kernel, chrome-platform, linux-arm-kernel,
linux-mediatek
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>
---
drivers/power/reset/qemu-virt-ctrl.c | 2 +-
drivers/power/supply/charger-manager.c | 4 ++--
drivers/power/supply/cros_charge-control.c | 4 ++--
drivers/power/supply/cros_peripheral_charger.c | 4 ++--
drivers/power/supply/cros_usbpd-charger.c | 4 ++--
drivers/power/supply/max77693_charger.c | 2 +-
drivers/power/supply/max8997_charger.c | 2 +-
drivers/power/supply/mt6360_charger.c | 4 ++--
8 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/power/reset/qemu-virt-ctrl.c b/drivers/power/reset/qemu-virt-ctrl.c
index 01409dfe2265..aa8355270b2c 100644
--- a/drivers/power/reset/qemu-virt-ctrl.c
+++ b/drivers/power/reset/qemu-virt-ctrl.c
@@ -103,7 +103,7 @@ static int qemu_virt_ctrl_probe(struct platform_device *pdev)
}
static const struct platform_device_id qemu_virt_ctrl_id[] = {
- { "qemu-virt-ctrl", 0 },
+ { .name = "qemu-virt-ctrl" },
{ }
};
MODULE_DEVICE_TABLE(platform, qemu_virt_ctrl_id);
diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
index 1b0239c59114..fa7518e9d72f 100644
--- a/drivers/power/supply/charger-manager.c
+++ b/drivers/power/supply/charger-manager.c
@@ -1649,8 +1649,8 @@ static void charger_manager_remove(struct platform_device *pdev)
}
static const struct platform_device_id charger_manager_id[] = {
- { "charger-manager", 0 },
- { },
+ { .name = "charger-manager" },
+ { }
};
MODULE_DEVICE_TABLE(platform, charger_manager_id);
diff --git a/drivers/power/supply/cros_charge-control.c b/drivers/power/supply/cros_charge-control.c
index 53e6a77e03fc..b489325be816 100644
--- a/drivers/power/supply/cros_charge-control.c
+++ b/drivers/power/supply/cros_charge-control.c
@@ -320,8 +320,8 @@ static int cros_chctl_probe(struct platform_device *pdev)
}
static const struct platform_device_id cros_chctl_id[] = {
- { "cros-charge-control", 0 },
- {}
+ { .name = "cros-charge-control" },
+ { }
};
static struct platform_driver cros_chctl_driver = {
diff --git a/drivers/power/supply/cros_peripheral_charger.c b/drivers/power/supply/cros_peripheral_charger.c
index f132fad288cb..9f67a6dbd94e 100644
--- a/drivers/power/supply/cros_peripheral_charger.c
+++ b/drivers/power/supply/cros_peripheral_charger.c
@@ -369,8 +369,8 @@ static int __maybe_unused cros_pchg_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(cros_pchg_pm_ops, NULL, cros_pchg_resume);
static const struct platform_device_id cros_pchg_id[] = {
- { DRV_NAME, 0 },
- {}
+ { .name = DRV_NAME },
+ { }
};
MODULE_DEVICE_TABLE(platform, cros_pchg_id);
diff --git a/drivers/power/supply/cros_usbpd-charger.c b/drivers/power/supply/cros_usbpd-charger.c
index 7d3e676a951c..308e1d4e6dd8 100644
--- a/drivers/power/supply/cros_usbpd-charger.c
+++ b/drivers/power/supply/cros_usbpd-charger.c
@@ -707,8 +707,8 @@ static SIMPLE_DEV_PM_OPS(cros_usbpd_charger_pm_ops, NULL,
cros_usbpd_charger_resume);
static const struct platform_device_id cros_usbpd_charger_id[] = {
- { DRV_NAME, 0 },
- {}
+ { .name = DRV_NAME },
+ { }
};
MODULE_DEVICE_TABLE(platform, cros_usbpd_charger_id);
diff --git a/drivers/power/supply/max77693_charger.c b/drivers/power/supply/max77693_charger.c
index 027d6a539b65..76c58b32a374 100644
--- a/drivers/power/supply/max77693_charger.c
+++ b/drivers/power/supply/max77693_charger.c
@@ -788,7 +788,7 @@ static void max77693_charger_remove(struct platform_device *pdev)
}
static const struct platform_device_id max77693_charger_id[] = {
- { "max77693-charger", 0, },
+ { .name = "max77693-charger" },
{ }
};
MODULE_DEVICE_TABLE(platform, max77693_charger_id);
diff --git a/drivers/power/supply/max8997_charger.c b/drivers/power/supply/max8997_charger.c
index 1ec3535a257d..19da9eff0372 100644
--- a/drivers/power/supply/max8997_charger.c
+++ b/drivers/power/supply/max8997_charger.c
@@ -268,7 +268,7 @@ static int max8997_battery_probe(struct platform_device *pdev)
}
static const struct platform_device_id max8997_battery_id[] = {
- { "max8997-battery", 0 },
+ { .name = "max8997-battery" },
{ }
};
MODULE_DEVICE_TABLE(platform, max8997_battery_id);
diff --git a/drivers/power/supply/mt6360_charger.c b/drivers/power/supply/mt6360_charger.c
index 77747eb51667..69955f255091 100644
--- a/drivers/power/supply/mt6360_charger.c
+++ b/drivers/power/supply/mt6360_charger.c
@@ -841,8 +841,8 @@ static const struct of_device_id __maybe_unused mt6360_charger_of_id[] = {
MODULE_DEVICE_TABLE(of, mt6360_charger_of_id);
static const struct platform_device_id mt6360_charger_id[] = {
- { "mt6360-chg", 0 },
- {},
+ { .name = "mt6360-chg" },
+ { }
};
MODULE_DEVICE_TABLE(platform, mt6360_charger_id);
--
2.47.3
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v1 1/6] power: Drop unused assignment of platform_device_id driver data
2026-05-29 10:18 ` [PATCH v1 1/6] power: Drop unused assignment of platform_device_id driver data Uwe Kleine-König (The Capable Hub)
@ 2026-05-29 22:02 ` Tzung-Bi Shih
0 siblings, 0 replies; 9+ messages in thread
From: Tzung-Bi Shih @ 2026-05-29 22:02 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub)
Cc: Sebastian Reichel, Kuan-Wei Chiu, Benson Leung, Guenter Roeck,
Thomas Weißschuh, Krzysztof Kozlowski, Matthias Brugger,
AngeloGioacchino Del Regno, linux-pm, linux-kernel,
chrome-platform, linux-arm-kernel, linux-mediatek
On Fri, May 29, 2026 at 12:18:16PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> 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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v1 4/6] power: Use named initializers for platform_device_id arrays
2026-05-29 10:18 [PATCH v1 0/6] power: Use named initializers for platform_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-05-29 10:18 ` [PATCH v1 1/6] power: Drop unused assignment of platform_device_id driver data Uwe Kleine-König (The Capable Hub)
@ 2026-05-29 10:18 ` Uwe Kleine-König (The Capable Hub)
2026-05-29 11:29 ` Joshua Peisach
2026-06-01 6:48 ` Matti Vaittinen
2026-05-29 10:18 ` [PATCH v1 5/6] power: supply: mt6360_charger: Use of match table unconditionally Uwe Kleine-König (The Capable Hub)
2026-06-03 20:46 ` (subset) [PATCH v1 0/6] power: Use named initializers for platform_device_id arrays Sebastian Reichel
3 siblings, 2 replies; 9+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-05-29 10:18 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Yixun Lan, Andreas Kemnade, Matti Vaittinen, Sven Peter,
Janne Grunau, Neal Gompa, Amit Sunil Dhamne, Samuel Kayode,
linux-pm, linux-riscv, spacemit, linux-kernel, asahi,
linux-arm-kernel, imx
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>
---
drivers/power/reset/spacemit-p1-reboot.c | 4 ++--
drivers/power/reset/tps65086-restart.c | 2 +-
drivers/power/supply/bd71828-power.c | 8 ++++----
drivers/power/supply/macsmc-power.c | 2 +-
drivers/power/supply/max77759_charger.c | 2 +-
drivers/power/supply/max8998_charger.c | 2 +-
drivers/power/supply/pf1550-charger.c | 2 +-
drivers/power/supply/rt5033_charger.c | 2 +-
8 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/power/reset/spacemit-p1-reboot.c b/drivers/power/reset/spacemit-p1-reboot.c
index 9ec3d1fff8f3..84026b042ea2 100644
--- a/drivers/power/reset/spacemit-p1-reboot.c
+++ b/drivers/power/reset/spacemit-p1-reboot.c
@@ -70,8 +70,8 @@ static int spacemit_p1_reboot_probe(struct platform_device *pdev)
}
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);
diff --git a/drivers/power/reset/tps65086-restart.c b/drivers/power/reset/tps65086-restart.c
index 6976dbcac74f..37d248a9df17 100644
--- a/drivers/power/reset/tps65086-restart.c
+++ b/drivers/power/reset/tps65086-restart.c
@@ -41,7 +41,7 @@ static int tps65086_restart_probe(struct platform_device *pdev)
}
static const struct platform_device_id tps65086_restart_id_table[] = {
- { "tps65086-reset", },
+ { .name = "tps65086-reset" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(platform, tps65086_restart_id_table);
diff --git a/drivers/power/supply/bd71828-power.c b/drivers/power/supply/bd71828-power.c
index 5e78faa0a4aa..5ab514ff5c65 100644
--- a/drivers/power/supply/bd71828-power.c
+++ b/drivers/power/supply/bd71828-power.c
@@ -1184,10 +1184,10 @@ static int bd71828_power_probe(struct platform_device *pdev)
}
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);
diff --git a/drivers/power/supply/macsmc-power.c b/drivers/power/supply/macsmc-power.c
index 33ca07460f3a..ced07f71e0a8 100644
--- a/drivers/power/supply/macsmc-power.c
+++ b/drivers/power/supply/macsmc-power.c
@@ -834,7 +834,7 @@ static void macsmc_power_remove(struct platform_device *pdev)
}
static const struct platform_device_id macsmc_power_id[] = {
- { "macsmc-power" },
+ { .name = "macsmc-power" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(platform, macsmc_power_id);
diff --git a/drivers/power/supply/max77759_charger.c b/drivers/power/supply/max77759_charger.c
index 9bb414599f16..c606d7bafcb8 100644
--- a/drivers/power/supply/max77759_charger.c
+++ b/drivers/power/supply/max77759_charger.c
@@ -754,7 +754,7 @@ static int max77759_charger_probe(struct platform_device *pdev)
}
static const struct platform_device_id max77759_charger_id[] = {
- { .name = "max77759-charger", },
+ { .name = "max77759-charger" },
{ }
};
MODULE_DEVICE_TABLE(platform, max77759_charger_id);
diff --git a/drivers/power/supply/max8998_charger.c b/drivers/power/supply/max8998_charger.c
index 418b882b163d..b0eda2b51e7f 100644
--- a/drivers/power/supply/max8998_charger.c
+++ b/drivers/power/supply/max8998_charger.c
@@ -188,7 +188,7 @@ static int max8998_battery_probe(struct platform_device *pdev)
}
static const struct platform_device_id max8998_battery_id[] = {
- { "max8998-battery", TYPE_MAX8998 },
+ { .name = "max8998-battery" },
{ }
};
MODULE_DEVICE_TABLE(platform, max8998_battery_id);
diff --git a/drivers/power/supply/pf1550-charger.c b/drivers/power/supply/pf1550-charger.c
index a457862ef461..41036f4cb64a 100644
--- a/drivers/power/supply/pf1550-charger.c
+++ b/drivers/power/supply/pf1550-charger.c
@@ -622,7 +622,7 @@ static int pf1550_charger_probe(struct platform_device *pdev)
}
static const struct platform_device_id pf1550_charger_id[] = {
- { "pf1550-charger", },
+ { .name = "pf1550-charger" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(platform, pf1550_charger_id);
diff --git a/drivers/power/supply/rt5033_charger.c b/drivers/power/supply/rt5033_charger.c
index de724f23e453..536ab29b657d 100644
--- a/drivers/power/supply/rt5033_charger.c
+++ b/drivers/power/supply/rt5033_charger.c
@@ -727,7 +727,7 @@ static int rt5033_charger_probe(struct platform_device *pdev)
}
static const struct platform_device_id rt5033_charger_id[] = {
- { "rt5033-charger", },
+ { .name = "rt5033-charger" },
{ }
};
MODULE_DEVICE_TABLE(platform, rt5033_charger_id);
--
2.47.3
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v1 4/6] power: Use named initializers for platform_device_id arrays
2026-05-29 10:18 ` [PATCH v1 4/6] power: Use named initializers for platform_device_id arrays Uwe Kleine-König (The Capable Hub)
@ 2026-05-29 11:29 ` Joshua Peisach
2026-05-29 18:49 ` Uwe Kleine-König (The Capable Hub)
2026-06-01 6:48 ` Matti Vaittinen
1 sibling, 1 reply; 9+ messages in thread
From: Joshua Peisach @ 2026-05-29 11:29 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub), Sebastian Reichel
Cc: Yixun Lan, Andreas Kemnade, Matti Vaittinen, Sven Peter,
Janne Grunau, Neal Gompa, Amit Sunil Dhamne, Samuel Kayode,
linux-pm, linux-riscv, spacemit, linux-kernel, asahi,
linux-arm-kernel, imx
On Fri May 29, 2026 at 6:18 AM EDT, Uwe Kleine-König (The Capable Hub) wrote:
> 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>
> ---
> drivers/power/reset/spacemit-p1-reboot.c | 4 ++--
> drivers/power/reset/tps65086-restart.c | 2 +-
> drivers/power/supply/bd71828-power.c | 8 ++++----
> drivers/power/supply/macsmc-power.c | 2 +-
> drivers/power/supply/max77759_charger.c | 2 +-
> drivers/power/supply/max8998_charger.c | 2 +-
> drivers/power/supply/pf1550-charger.c | 2 +-
> drivers/power/supply/rt5033_charger.c | 2 +-
> 8 files changed, 12 insertions(+), 12 deletions(-)
[snip]
> diff --git a/drivers/power/supply/macsmc-power.c b/drivers/power/supply/macsmc-power.c
> index 33ca07460f3a..ced07f71e0a8 100644
> --- a/drivers/power/supply/macsmc-power.c
> +++ b/drivers/power/supply/macsmc-power.c
> @@ -834,7 +834,7 @@ static void macsmc_power_remove(struct platform_device *pdev)
> }
>
> static const struct platform_device_id macsmc_power_id[] = {
> - { "macsmc-power" },
> + { .name = "macsmc-power" },
> { /* sentinel */ }
> };
> MODULE_DEVICE_TABLE(platform, macsmc_power_id);
For macsmc-power,
Reviewed-by: Joshua Peisach <jpeisach@ubuntu•com>
(I'm not sure if one can "Review-by" a specific section of a singular
patch, but also the other changes in the patch look fine to me, so
consider it reviewed as well.)
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH v1 4/6] power: Use named initializers for platform_device_id arrays
2026-05-29 11:29 ` Joshua Peisach
@ 2026-05-29 18:49 ` Uwe Kleine-König (The Capable Hub)
0 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-05-29 18:49 UTC (permalink / raw)
To: Joshua Peisach
Cc: Sebastian Reichel, Yixun Lan, Andreas Kemnade, Matti Vaittinen,
Sven Peter, Janne Grunau, Neal Gompa, Amit Sunil Dhamne,
Samuel Kayode, linux-pm, linux-riscv, spacemit, linux-kernel,
asahi, linux-arm-kernel, imx
[-- Attachment #1: Type: text/plain, Size: 681 bytes --]
Hello Joshua,
On Fri, May 29, 2026 at 07:29:08AM -0400, Joshua Peisach wrote:
> For macsmc-power,
>
> Reviewed-by: Joshua Peisach <jpeisach@ubuntu•com>
Thanks!
> (I'm not sure if one can "Review-by" a specific section of a singular
> patch, but also the other changes in the patch look fine to me, so
> consider it reviewed as well.)
I think what you did is quite usual. The restriction doesn't make it
into git history this way though. Another usual idiom that can be found
often in git-log is:
Reviewed-by_ Joshua Peisach <jpeisach@ubuntu•com> # macsmc-power
(intentionally added did s/:/_/ to not make tools pick up this line).
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 4/6] power: Use named initializers for platform_device_id arrays
2026-05-29 10:18 ` [PATCH v1 4/6] power: Use named initializers for platform_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-05-29 11:29 ` Joshua Peisach
@ 2026-06-01 6:48 ` Matti Vaittinen
1 sibling, 0 replies; 9+ messages in thread
From: Matti Vaittinen @ 2026-06-01 6:48 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub), Sebastian Reichel
Cc: Yixun Lan, Andreas Kemnade, Sven Peter, Janne Grunau, Neal Gompa,
Amit Sunil Dhamne, Samuel Kayode, linux-pm, linux-riscv, spacemit,
linux-kernel, asahi, linux-arm-kernel, imx
On 29/05/2026 13:18, Uwe Kleine-König (The Capable Hub) wrote:
> 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>
Yours,
-- Matti
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v1 5/6] power: supply: mt6360_charger: Use of match table unconditionally
2026-05-29 10:18 [PATCH v1 0/6] power: Use named initializers for platform_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-05-29 10:18 ` [PATCH v1 1/6] power: Drop unused assignment of platform_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-05-29 10:18 ` [PATCH v1 4/6] power: Use named initializers for platform_device_id arrays Uwe Kleine-König (The Capable Hub)
@ 2026-05-29 10:18 ` Uwe Kleine-König (The Capable Hub)
2026-06-03 20:46 ` (subset) [PATCH v1 0/6] power: Use named initializers for platform_device_id arrays Sebastian Reichel
3 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-05-29 10:18 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Matthias Brugger, AngeloGioacchino Del Regno, linux-pm,
linux-kernel, linux-arm-kernel, linux-mediatek
mt6360_charger_of_id is defined unconditionally, so it doesn't make sense
to not use it for the driver's .of_match_table member.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre•com>
---
drivers/power/supply/mt6360_charger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/mt6360_charger.c b/drivers/power/supply/mt6360_charger.c
index 69955f255091..d3b0731f6562 100644
--- a/drivers/power/supply/mt6360_charger.c
+++ b/drivers/power/supply/mt6360_charger.c
@@ -849,7 +849,7 @@ MODULE_DEVICE_TABLE(platform, mt6360_charger_id);
static struct platform_driver mt6360_charger_driver = {
.driver = {
.name = "mt6360-chg",
- .of_match_table = of_match_ptr(mt6360_charger_of_id),
+ .of_match_table = mt6360_charger_of_id,
},
.probe = mt6360_charger_probe,
.id_table = mt6360_charger_id,
--
2.47.3
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: (subset) [PATCH v1 0/6] power: Use named initializers for platform_device_id arrays
2026-05-29 10:18 [PATCH v1 0/6] power: Use named initializers for platform_device_id arrays Uwe Kleine-König (The Capable Hub)
` (2 preceding siblings ...)
2026-05-29 10:18 ` [PATCH v1 5/6] power: supply: mt6360_charger: Use of match table unconditionally Uwe Kleine-König (The Capable Hub)
@ 2026-06-03 20:46 ` Sebastian Reichel
3 siblings, 0 replies; 9+ messages in thread
From: Sebastian Reichel @ 2026-06-03 20:46 UTC (permalink / raw)
To: Sebastian Reichel, Uwe Kleine-König (The Capable Hub)
Cc: Kuan-Wei Chiu, Benson Leung, Guenter Roeck, Thomas Weißschuh,
Krzysztof Kozlowski, Matthias Brugger, AngeloGioacchino Del Regno,
linux-pm, linux-kernel, chrome-platform, linux-arm-kernel,
linux-mediatek, Hans de Goede, Marek Szyprowski,
Sebastian Krzyszkowiak, Purism Kernel Team, Yixun Lan,
Andreas Kemnade, Matti Vaittinen, Sven Peter, Janne Grunau,
Neal Gompa, Amit Sunil Dhamne, Samuel Kayode, linux-riscv,
spacemit, asahi, imx, Chen-Yu Tsai
On Fri, 29 May 2026 12:18:15 +0200, Uwe Kleine-König (The Capable Hub) wrote:
> this series targets to use named initializers for platform_device_id
> arrays. In general these are better readable for humans and more robust
> to changes in the respective struct definition.
>
> This robustness is needed as I want to do
>
> diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
> --- a/include/linux/mod_devicetable.h
> +++ b/include/linux/mod_devicetable.h
> @@ -610,4 +610,7 @@ struct dmi_system_id {
> struct platform_device_id {
> char name[PLATFORM_NAME_SIZE];
> - kernel_ulong_t driver_data;
> + union {
> + kernel_ulong_t driver_data;
> + const void *driver_data_ptr;
> + };
> };
>
> [...]
Applied, thanks!
[1/6] power: Drop unused assignment of platform_device_id driver data
commit: 75a0e1e0b86078687c3c6a05107a98c7e59a65a8
[2/6] power: supply: max14577: Drop driver data in of and platform device id arrays
commit: 37258ad1f3a52ea442c32b3c92ad7146e74050c7
[4/6] power: Use named initializers for platform_device_id arrays
commit: e28f7498dd819878b8acacb89c4c073a646feea0
[5/6] power: supply: mt6360_charger: Use of match table unconditionally
commit: eb7ed650e5960fc303130704d1e29d18a7d0e1df
[6/6] power: Unify code style for platform_device_id arrays
commit: e3f669bed32287ae72c05a4ddab4a6687b0e62ca
Best regards,
--
Sebastian Reichel <sebastian.reichel@collabora•com>
^ permalink raw reply [flat|nested] 9+ messages in thread