* [PATCH v4 00/20] mfd: Use named initializers for arrays of *_device_data
@ 2026-11-10 21:54 Uwe Kleine-König (The Capable Hub)
2026-11-10 21:54 ` [PATCH v4 07/20] mfd: loongson-se: Drop unused assignment of acpi_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-11-10 21:54 ` [PATCH v4 10/20] mfd: Use named initializers for acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
0 siblings, 2 replies; 6+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-11-10 21:54 UTC (permalink / raw)
To: Lee Jones
Cc: Florian Fainelli, Broadcom internal kernel review list, Ray Jui,
Scott Branden, mfd, linux-rpi-kernel, linux-arm-kernel,
linux-kernel, Matthias Brugger, AngeloGioacchino Del Regno,
linux-mediatek, Qunqin Zhao, linux-crypto, Benson Leung,
Guenter Roeck, chrome-platform, David Rhodes, Richard Fitzgerald,
Andy Shevchenko, Mika Westerberg, Zha Qipeng, Thomas Richard,
linux-sound, patches, Xu Yilun, Tom Rix, Michael Hennerich,
Chen-Yu Tsai, Marek Vasut, James Ogletree, Fred Treven,
Ben Bright, Support Opensource, Andy Shevchenko, Charles Keepax,
Chanwoo Choi, Krzysztof Kozlowski, André Draszik,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Andreas Werner, Samuel Kayode, Maxime Coquelin,
Alexandre Torgue, linux-renesas-soc, linux-omap, imx, linux-stm32,
Linus Walleij, linux, Nicolas Ferre, Alexandre Belloni,
Claudiu Beznea, Peter Griffin, Alim Akhtar, Tim Harvey,
Neil Armstrong, Sven Peter, Janne Grunau, Neal Gompa,
Mathieu Dubois-Briand, Luca Ceresoli, Saravanan Sekar, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Jonathan Neuschäfer, Matti Vaittinen, Orson Zhai,
Baolin Wang, Chunyan Zhang, Fabrice Gasnier, Jernej Skrabec,
Samuel Holland, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
Geert Uytterhoeven, Magnus Damm, Heiko Stuebner,
linux-samsung-soc, linux-amlogic, asahi, linux-arm-msm,
linux-sunxi, linux-rockchip, Peter Tyser
Hello,
the objective for this series is to prepare mfd for changing
of_device_id and the others to make driver_data a union, see
https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@baylibre.com/
for the idea behind it.
Changes since v3
(https://lore.kernel.org/cover.1783615311.git.u.kleine-koenig@baylibre.com):
- Rebase to v7.4-rc1
- add various R-b tags
- Fix a bug in patch 3 found by sashiko where I accidentally deleted a
* in sizeof(*pdata).
- Drop patches about spi_device_id that were sent separately initially
and applied in the meantime
These patches are a pain to track and forward port and they are mostly
orthogonal, so I'm happy about a partial application of this series if
only some patches are considered ready.
Best regards
Uwe
Uwe Kleine-König (The Capable Hub) (20):
mfd: bcm2835-pm: Remove member of struct bcm2835_pm that is only used
locally
mfd: bcm2835-pm: Drop unused header
mfd: kempld: Simplify device abstraction
mfd: lp87565: Explicitly set driver data for the generic dt compatible
mfd: mt6360: Drop irrelevant __maybe_unused
mfd: rt4831: Drop irrelevant __maybe_unused
mfd: loongson-se: Drop unused assignment of acpi_device_id driver data
mfd: Drop unused assignment of i2c_device_id driver data
mfd: Drop unused assignment of platform_device_id driver data
mfd: Use named initializers for acpi_device_id arrays
mfd: intel-m10-bmc-pmci: Use named initializers for dfl_device_id
array
mfd: Use named initializers for arrays of i2c_device_id
mfd: twl6030: Use named initializers for of_device_id
mfd: Use PCI_DEVICE* macros to initialize pci_device_id arrays
mfd: Use named initializers for platform_device_id array
mfd: Unify style of acpi_device_id arrays
mfd: Unify style of dmi_system_id arrays
mfd: Unify style of i2c_device_id arrays
mfd: Unify style of of_device_id arrays
mfd: Unify style of pci_device_id arrays
drivers/mfd/88pm800.c | 4 +-
drivers/mfd/88pm805.c | 4 +-
drivers/mfd/88pm860x-core.c | 8 ++--
drivers/mfd/aat2870-core.c | 2 +-
drivers/mfd/ab8500-core.c | 8 ++--
drivers/mfd/ab8500-sysctrl.c | 4 +-
drivers/mfd/ac100.c | 2 +-
drivers/mfd/act8945a.c | 8 ++--
drivers/mfd/adp5520.c | 4 +-
drivers/mfd/altera-a10sr.c | 2 +-
drivers/mfd/altera-sysmgr.c | 2 +-
drivers/mfd/arizona-i2c.c | 14 +++---
drivers/mfd/arizona-spi.c | 2 +-
drivers/mfd/as3711.c | 8 ++--
drivers/mfd/as3722.c | 8 ++--
drivers/mfd/atmel-hlcdc.c | 2 +-
drivers/mfd/atmel-smc.c | 2 +-
drivers/mfd/axp20x-i2c.c | 26 +++++-----
drivers/mfd/axp20x-rsb.c | 2 +-
drivers/mfd/bcm2835-pm.c | 15 ++++--
drivers/mfd/bcm590xx.c | 4 +-
drivers/mfd/bd9571mwv.c | 6 +--
drivers/mfd/bq257xx.c | 8 ++--
drivers/mfd/cgbc-core.c | 2 +-
drivers/mfd/cros_ec_dev.c | 2 +-
drivers/mfd/cs40l50-i2c.c | 6 +--
drivers/mfd/cs40l50-spi.c | 2 +-
drivers/mfd/cs42l43-i2c.c | 10 ++--
drivers/mfd/cs5535-mfd.c | 2 +-
drivers/mfd/da903x.c | 6 +--
drivers/mfd/da9052-i2c.c | 12 ++---
drivers/mfd/da9055-i2c.c | 4 +-
drivers/mfd/da9062-core.c | 4 +-
drivers/mfd/da9063-i2c.c | 11 +++--
drivers/mfd/da9150-core.c | 4 +-
drivers/mfd/db8500-prcmu.c | 4 +-
drivers/mfd/exynos-lpass.c | 2 +-
drivers/mfd/gateworks-gsc.c | 2 +-
drivers/mfd/hi6421-pmic-core.c | 6 +--
drivers/mfd/hi655x-pmic.c | 4 +-
drivers/mfd/intel-lpss-acpi.c | 58 +++++++++++------------
drivers/mfd/intel-m10-bmc-pmci.c | 2 +-
drivers/mfd/intel_pmc_bxt.c | 2 +-
drivers/mfd/intel_quark_i2c_gpio.c | 6 +--
drivers/mfd/intel_soc_pmic_bxtwc.c | 2 +-
drivers/mfd/intel_soc_pmic_chtdc_ti.c | 4 +-
drivers/mfd/intel_soc_pmic_chtwc.c | 2 +-
drivers/mfd/intel_soc_pmic_crc.c | 6 +--
drivers/mfd/intel_soc_pmic_mrfld.c | 4 +-
drivers/mfd/ioc3.c | 4 +-
drivers/mfd/janz-cmodio.c | 14 +++---
drivers/mfd/kempld-core.c | 68 +++++++--------------------
drivers/mfd/khadas-mcu.c | 2 +-
drivers/mfd/lm3533-core.c | 2 +-
drivers/mfd/lochnagar-i2c.c | 2 +-
drivers/mfd/loongson-se.c | 2 +-
drivers/mfd/lp3943.c | 4 +-
drivers/mfd/lp873x.c | 8 ++--
drivers/mfd/lp87565.c | 9 ++--
drivers/mfd/lp8788.c | 2 +-
drivers/mfd/lpc_ich.c | 2 +-
drivers/mfd/macsmc.c | 2 +-
drivers/mfd/madera-core.c | 2 +-
drivers/mfd/madera-i2c.c | 18 +++----
drivers/mfd/max14577.c | 6 +--
drivers/mfd/max7360.c | 2 +-
drivers/mfd/max77541.c | 4 +-
drivers/mfd/max77620.c | 8 ++--
drivers/mfd/max77686.c | 2 +-
drivers/mfd/max77693.c | 4 +-
drivers/mfd/max77714.c | 2 +-
drivers/mfd/max77759.c | 4 +-
drivers/mfd/max77843.c | 8 ++--
drivers/mfd/max8907.c | 6 +--
drivers/mfd/max8925-i2c.c | 6 +--
drivers/mfd/max8997.c | 6 +--
drivers/mfd/max8998.c | 6 +--
drivers/mfd/mc13xxx-spi.c | 6 +--
drivers/mfd/menelaus.c | 2 +-
drivers/mfd/menf21bmc.c | 2 +-
drivers/mfd/mp2629.c | 2 +-
drivers/mfd/mt6360-core.c | 6 +--
drivers/mfd/mt6370.c | 2 +-
drivers/mfd/mt6397-core.c | 4 +-
drivers/mfd/mxs-lradc.c | 4 +-
drivers/mfd/ntxec.c | 4 +-
drivers/mfd/omap-usb-host.c | 4 +-
drivers/mfd/palmas.c | 8 ++--
drivers/mfd/pf1550.c | 2 +-
drivers/mfd/qcom-pm8008.c | 4 +-
drivers/mfd/qcom-pm8xxx.c | 6 +--
drivers/mfd/rave-sp.c | 4 +-
drivers/mfd/rc5t583.c | 4 +-
drivers/mfd/rdc321x-southbridge.c | 2 +-
drivers/mfd/retu-mfd.c | 4 +-
drivers/mfd/rk8xx-i2c.c | 2 +-
drivers/mfd/rk8xx-spi.c | 2 +-
drivers/mfd/rohm-bd71828.c | 4 +-
drivers/mfd/rohm-bd9576.c | 6 +--
drivers/mfd/rsmu_i2c.c | 18 +++----
drivers/mfd/rsmu_spi.c | 2 +-
drivers/mfd/rt4831.c | 6 +--
drivers/mfd/rt5033.c | 4 +-
drivers/mfd/rt5120.c | 2 +-
drivers/mfd/rz-mtu3.c | 2 +-
drivers/mfd/sec-acpm.c | 6 +--
drivers/mfd/sec-i2c.c | 22 ++++-----
drivers/mfd/si476x-i2c.c | 8 ++--
drivers/mfd/simple-mfd-i2c.c | 2 +-
drivers/mfd/sky81452.c | 4 +-
drivers/mfd/sm501.c | 4 +-
drivers/mfd/smpro-core.c | 2 +-
drivers/mfd/sprd-sc27xx-spi.c | 2 +-
drivers/mfd/ssbi.c | 2 +-
drivers/mfd/stm32-lptimer.c | 4 +-
drivers/mfd/stm32-timers.c | 4 +-
drivers/mfd/stmfx.c | 4 +-
drivers/mfd/stmpe-i2c.c | 34 +++++++-------
drivers/mfd/stmpe-spi.c | 14 +++---
drivers/mfd/stpmic1.c | 4 +-
drivers/mfd/stw481x.c | 8 ++--
drivers/mfd/sun6i-prcm.c | 2 +-
drivers/mfd/tc3589x.c | 14 +++---
drivers/mfd/ti-lmu.c | 10 ++--
drivers/mfd/timberdale.c | 2 +-
drivers/mfd/tps6105x.c | 6 +--
drivers/mfd/tps65010.c | 10 ++--
drivers/mfd/tps6507x.c | 6 +--
drivers/mfd/tps65086.c | 4 +-
drivers/mfd/tps65090.c | 6 +--
drivers/mfd/tps65217.c | 6 +--
drivers/mfd/tps65218.c | 8 ++--
drivers/mfd/tps65219.c | 8 ++--
drivers/mfd/tps6586x.c | 6 +--
drivers/mfd/tps65910.c | 12 ++---
drivers/mfd/tps65912-i2c.c | 4 +-
drivers/mfd/tps65912-spi.c | 2 +-
drivers/mfd/tps6594-i2c.c | 12 ++---
drivers/mfd/tps6594-spi.c | 12 ++---
drivers/mfd/tqmx86.c | 2 +-
drivers/mfd/twl-core.c | 22 ++++-----
drivers/mfd/twl4030-audio.c | 4 +-
drivers/mfd/twl4030-power.c | 2 +-
drivers/mfd/twl6030-irq.c | 6 +--
drivers/mfd/twl6040.c | 4 +-
drivers/mfd/upboard-fpga.c | 6 +--
drivers/mfd/vexpress-sysreg.c | 4 +-
drivers/mfd/vx855.c | 2 +-
drivers/mfd/wm831x-core.c | 2 +-
drivers/mfd/wm831x-i2c.c | 14 +++---
drivers/mfd/wm8350-i2c.c | 6 +--
drivers/mfd/wm8400-core.c | 4 +-
drivers/mfd/wm8994-core.c | 8 ++--
include/linux/mfd/bcm2835-pm.h | 9 ----
include/linux/mfd/kempld.h | 12 -----
155 files changed, 478 insertions(+), 520 deletions(-)
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
--
2.56.0.rc1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v4 07/20] mfd: loongson-se: Drop unused assignment of acpi_device_id driver data
2026-11-10 21:54 [PATCH v4 00/20] mfd: Use named initializers for arrays of *_device_data Uwe Kleine-König (The Capable Hub)
@ 2026-11-10 21:54 ` Uwe Kleine-König (The Capable Hub)
2026-11-10 21:54 ` [PATCH v4 10/20] mfd: Use named initializers for acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
1 sibling, 0 replies; 6+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-11-10 21:54 UTC (permalink / raw)
To: Lee Jones; +Cc: Qunqin Zhao, linux-crypto, mfd, linux-kernel, Linus Walleij
The driver explicitly set the .driver_data member of struct
acpi_device_id to zero without relying on that value. Drop this unused
assignment.
This patch doesn't modify the compiled array, only its representation in
source form benefits.
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
drivers/mfd/loongson-se.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/loongson-se.c b/drivers/mfd/loongson-se.c
index 3902ba377d69..4c668e2d2241 100644
--- a/drivers/mfd/loongson-se.c
+++ b/drivers/mfd/loongson-se.c
@@ -233,7 +233,7 @@ static int loongson_se_probe(struct platform_device *pdev)
}
static const struct acpi_device_id loongson_se_acpi_match[] = {
- { "LOON0011", 0 },
+ { "LOON0011" },
{ }
};
MODULE_DEVICE_TABLE(acpi, loongson_se_acpi_match);
--
2.56.0.rc1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v4 10/20] mfd: Use named initializers for acpi_device_id arrays
2026-11-10 21:54 [PATCH v4 00/20] mfd: Use named initializers for arrays of *_device_data Uwe Kleine-König (The Capable Hub)
2026-11-10 21:54 ` [PATCH v4 07/20] mfd: loongson-se: Drop unused assignment of acpi_device_id driver data Uwe Kleine-König (The Capable Hub)
@ 2026-11-10 21:54 ` Uwe Kleine-König (The Capable Hub)
2026-11-11 8:45 ` Andy Shevchenko
1 sibling, 1 reply; 6+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-11-10 21:54 UTC (permalink / raw)
To: Lee Jones
Cc: David Rhodes, Richard Fitzgerald, Andy Shevchenko,
Mika Westerberg, Zha Qipeng, Qunqin Zhao, Thomas Richard,
linux-sound, patches, mfd, linux-kernel, linux-crypto,
Charles Keepax, Linus Walleij
While being less compact, using named initializers allows to more easily
see which members of the structs are assigned which value without having
to lookup the declaration of the struct. And it's also more robust
against changes to the struct definition.
The mentioned robustness is relevant for a planned change to struct
acpi_device_id that replaces .driver_data by an anonymous union.
This patch doesn't modify the compiled arrays, only their representation
in source form benefits.
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
drivers/mfd/cs42l43-i2c.c | 6 +--
drivers/mfd/intel-lpss-acpi.c | 58 +++++++++++++--------------
drivers/mfd/intel_pmc_bxt.c | 2 +-
drivers/mfd/intel_soc_pmic_bxtwc.c | 2 +-
drivers/mfd/intel_soc_pmic_chtdc_ti.c | 2 +-
drivers/mfd/intel_soc_pmic_chtwc.c | 2 +-
drivers/mfd/intel_soc_pmic_crc.c | 2 +-
drivers/mfd/intel_soc_pmic_mrfld.c | 2 +-
drivers/mfd/kempld-core.c | 4 +-
drivers/mfd/loongson-se.c | 2 +-
drivers/mfd/upboard-fpga.c | 4 +-
11 files changed, 43 insertions(+), 43 deletions(-)
diff --git a/drivers/mfd/cs42l43-i2c.c b/drivers/mfd/cs42l43-i2c.c
index 2f1862199618..faf4fc6b3d73 100644
--- a/drivers/mfd/cs42l43-i2c.c
+++ b/drivers/mfd/cs42l43-i2c.c
@@ -73,9 +73,9 @@ MODULE_DEVICE_TABLE(of, cs42l43_of_match);
#if IS_ENABLED(CONFIG_ACPI)
static const struct acpi_device_id cs42l43_acpi_match[] = {
- { "CSC4243", CS42L43_DEVID_VAL },
- { "CSC2A3B", CS42L43B_DEVID_VAL },
- { "CSC4244", CS42L43B_DEVID_VAL },
+ { .id = "CSC4243", .driver_data = CS42L43_DEVID_VAL },
+ { .id = "CSC2A3B", .driver_data = CS42L43B_DEVID_VAL },
+ { .id = "CSC4244", .driver_data = CS42L43B_DEVID_VAL },
{}
};
MODULE_DEVICE_TABLE(acpi, cs42l43_acpi_match);
diff --git a/drivers/mfd/intel-lpss-acpi.c b/drivers/mfd/intel-lpss-acpi.c
index 720adb0ee21f..2f46a85066bd 100644
--- a/drivers/mfd/intel-lpss-acpi.c
+++ b/drivers/mfd/intel-lpss-acpi.c
@@ -137,38 +137,38 @@ static const struct intel_lpss_platform_info cnl_i2c_info = {
static const struct acpi_device_id intel_lpss_acpi_ids[] = {
/* SPT */
- { "INT3440", (kernel_ulong_t)&spt_info },
- { "INT3441", (kernel_ulong_t)&spt_info },
- { "INT3442", (kernel_ulong_t)&spt_i2c_info },
- { "INT3443", (kernel_ulong_t)&spt_i2c_info },
- { "INT3444", (kernel_ulong_t)&spt_i2c_info },
- { "INT3445", (kernel_ulong_t)&spt_i2c_info },
- { "INT3446", (kernel_ulong_t)&spt_i2c_info },
- { "INT3447", (kernel_ulong_t)&spt_i2c_info },
- { "INT3448", (kernel_ulong_t)&spt_uart_info },
- { "INT3449", (kernel_ulong_t)&spt_uart_info },
- { "INT344A", (kernel_ulong_t)&spt_uart_info },
+ { .id = "INT3440", .driver_data = (kernel_ulong_t)&spt_info },
+ { .id = "INT3441", .driver_data = (kernel_ulong_t)&spt_info },
+ { .id = "INT3442", .driver_data = (kernel_ulong_t)&spt_i2c_info },
+ { .id = "INT3443", .driver_data = (kernel_ulong_t)&spt_i2c_info },
+ { .id = "INT3444", .driver_data = (kernel_ulong_t)&spt_i2c_info },
+ { .id = "INT3445", .driver_data = (kernel_ulong_t)&spt_i2c_info },
+ { .id = "INT3446", .driver_data = (kernel_ulong_t)&spt_i2c_info },
+ { .id = "INT3447", .driver_data = (kernel_ulong_t)&spt_i2c_info },
+ { .id = "INT3448", .driver_data = (kernel_ulong_t)&spt_uart_info },
+ { .id = "INT3449", .driver_data = (kernel_ulong_t)&spt_uart_info },
+ { .id = "INT344A", .driver_data = (kernel_ulong_t)&spt_uart_info },
/* CNL */
- { "INT34B0", (kernel_ulong_t)&cnl_info },
- { "INT34B1", (kernel_ulong_t)&cnl_info },
- { "INT34B2", (kernel_ulong_t)&cnl_i2c_info },
- { "INT34B3", (kernel_ulong_t)&cnl_i2c_info },
- { "INT34B4", (kernel_ulong_t)&cnl_i2c_info },
- { "INT34B5", (kernel_ulong_t)&cnl_i2c_info },
- { "INT34B6", (kernel_ulong_t)&cnl_i2c_info },
- { "INT34B7", (kernel_ulong_t)&cnl_i2c_info },
- { "INT34B8", (kernel_ulong_t)&spt_uart_info },
- { "INT34B9", (kernel_ulong_t)&spt_uart_info },
- { "INT34BA", (kernel_ulong_t)&spt_uart_info },
- { "INT34BC", (kernel_ulong_t)&cnl_info },
+ { .id = "INT34B0", .driver_data = (kernel_ulong_t)&cnl_info },
+ { .id = "INT34B1", .driver_data = (kernel_ulong_t)&cnl_info },
+ { .id = "INT34B2", .driver_data = (kernel_ulong_t)&cnl_i2c_info },
+ { .id = "INT34B3", .driver_data = (kernel_ulong_t)&cnl_i2c_info },
+ { .id = "INT34B4", .driver_data = (kernel_ulong_t)&cnl_i2c_info },
+ { .id = "INT34B5", .driver_data = (kernel_ulong_t)&cnl_i2c_info },
+ { .id = "INT34B6", .driver_data = (kernel_ulong_t)&cnl_i2c_info },
+ { .id = "INT34B7", .driver_data = (kernel_ulong_t)&cnl_i2c_info },
+ { .id = "INT34B8", .driver_data = (kernel_ulong_t)&spt_uart_info },
+ { .id = "INT34B9", .driver_data = (kernel_ulong_t)&spt_uart_info },
+ { .id = "INT34BA", .driver_data = (kernel_ulong_t)&spt_uart_info },
+ { .id = "INT34BC", .driver_data = (kernel_ulong_t)&cnl_info },
/* BXT */
- { "80860AAC", (kernel_ulong_t)&bxt_i2c_info },
- { "80860ABC", (kernel_ulong_t)&bxt_info },
- { "80860AC2", (kernel_ulong_t)&bxt_info },
+ { .id = "80860AAC", .driver_data = (kernel_ulong_t)&bxt_i2c_info },
+ { .id = "80860ABC", .driver_data = (kernel_ulong_t)&bxt_info },
+ { .id = "80860AC2", .driver_data = (kernel_ulong_t)&bxt_info },
/* APL */
- { "80865AAC", (kernel_ulong_t)&apl_i2c_info },
- { "80865ABC", (kernel_ulong_t)&bxt_info },
- { "80865AC2", (kernel_ulong_t)&bxt_info },
+ { .id = "80865AAC", .driver_data = (kernel_ulong_t)&apl_i2c_info },
+ { .id = "80865ABC", .driver_data = (kernel_ulong_t)&bxt_info },
+ { .id = "80865AC2", .driver_data = (kernel_ulong_t)&bxt_info },
{ }
};
MODULE_DEVICE_TABLE(acpi, intel_lpss_acpi_ids);
diff --git a/drivers/mfd/intel_pmc_bxt.c b/drivers/mfd/intel_pmc_bxt.c
index e405d7513ca1..6a9ad1f135c7 100644
--- a/drivers/mfd/intel_pmc_bxt.c
+++ b/drivers/mfd/intel_pmc_bxt.c
@@ -414,7 +414,7 @@ static int intel_pmc_create_devices(struct intel_pmc_dev *pmc)
}
static const struct acpi_device_id intel_pmc_acpi_ids[] = {
- { "INT34D2" },
+ { .id = "INT34D2" },
{ }
};
MODULE_DEVICE_TABLE(acpi, intel_pmc_acpi_ids);
diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index 117517c171b5..08fedf3d3fee 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -606,7 +606,7 @@ static int bxtwc_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(bxtwc_pm_ops, bxtwc_suspend, bxtwc_resume);
static const struct acpi_device_id bxtwc_acpi_ids[] = {
- { "INT34D3", },
+ { .id = "INT34D3" },
{ }
};
MODULE_DEVICE_TABLE(acpi, bxtwc_acpi_ids);
diff --git a/drivers/mfd/intel_soc_pmic_chtdc_ti.c b/drivers/mfd/intel_soc_pmic_chtdc_ti.c
index 6daf33e07ea0..ff6223d6f54b 100644
--- a/drivers/mfd/intel_soc_pmic_chtdc_ti.c
+++ b/drivers/mfd/intel_soc_pmic_chtdc_ti.c
@@ -162,7 +162,7 @@ static int chtdc_ti_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(chtdc_ti_pm_ops, chtdc_ti_suspend, chtdc_ti_resume);
static const struct acpi_device_id chtdc_ti_acpi_ids[] = {
- { "INT33F5" },
+ { .id = "INT33F5" },
{ },
};
MODULE_DEVICE_TABLE(acpi, chtdc_ti_acpi_ids);
diff --git a/drivers/mfd/intel_soc_pmic_chtwc.c b/drivers/mfd/intel_soc_pmic_chtwc.c
index aa71a7d83fcd..413d2fd4f86a 100644
--- a/drivers/mfd/intel_soc_pmic_chtwc.c
+++ b/drivers/mfd/intel_soc_pmic_chtwc.c
@@ -261,7 +261,7 @@ static const struct i2c_device_id cht_wc_i2c_id[] = {
};
static const struct acpi_device_id cht_wc_acpi_ids[] = {
- { "INT34D3", },
+ { .id = "INT34D3" },
{ }
};
diff --git a/drivers/mfd/intel_soc_pmic_crc.c b/drivers/mfd/intel_soc_pmic_crc.c
index 627a89334908..d3db727c08de 100644
--- a/drivers/mfd/intel_soc_pmic_crc.c
+++ b/drivers/mfd/intel_soc_pmic_crc.c
@@ -252,7 +252,7 @@ static int crystal_cove_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(crystal_cove_pm_ops, crystal_cove_suspend, crystal_cove_resume);
static const struct acpi_device_id crystal_cove_acpi_match[] = {
- { "INT33FD" },
+ { .id = "INT33FD" },
{ },
};
MODULE_DEVICE_TABLE(acpi, crystal_cove_acpi_match);
diff --git a/drivers/mfd/intel_soc_pmic_mrfld.c b/drivers/mfd/intel_soc_pmic_mrfld.c
index 77121775c1a3..9d7e1881d693 100644
--- a/drivers/mfd/intel_soc_pmic_mrfld.c
+++ b/drivers/mfd/intel_soc_pmic_mrfld.c
@@ -139,7 +139,7 @@ static int bcove_probe(struct platform_device *pdev)
}
static const struct acpi_device_id bcove_acpi_ids[] = {
- { "INTC100E" },
+ { .id = "INTC100E" },
{}
};
MODULE_DEVICE_TABLE(acpi, bcove_acpi_ids);
diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c
index fbbff3eac500..71b226a57204 100644
--- a/drivers/mfd/kempld-core.c
+++ b/drivers/mfd/kempld-core.c
@@ -438,8 +438,8 @@ static void kempld_remove(struct platform_device *pdev)
}
static const struct acpi_device_id kempld_acpi_table[] = {
- { "KEM0000" },
- { "KEM0001" },
+ { .id = "KEM0000" },
+ { .id = "KEM0001" },
{}
};
MODULE_DEVICE_TABLE(acpi, kempld_acpi_table);
diff --git a/drivers/mfd/loongson-se.c b/drivers/mfd/loongson-se.c
index 4c668e2d2241..49a95b8e4ca3 100644
--- a/drivers/mfd/loongson-se.c
+++ b/drivers/mfd/loongson-se.c
@@ -233,7 +233,7 @@ static int loongson_se_probe(struct platform_device *pdev)
}
static const struct acpi_device_id loongson_se_acpi_match[] = {
- { "LOON0011" },
+ { .id = "LOON0011" },
{ }
};
MODULE_DEVICE_TABLE(acpi, loongson_se_acpi_match);
diff --git a/drivers/mfd/upboard-fpga.c b/drivers/mfd/upboard-fpga.c
index 9a9599dcb0a1..6674f4a1d2fe 100644
--- a/drivers/mfd/upboard-fpga.c
+++ b/drivers/mfd/upboard-fpga.c
@@ -300,8 +300,8 @@ static int upboard_fpga_probe(struct platform_device *pdev)
}
static const struct acpi_device_id upboard_fpga_acpi_match[] = {
- { "AANT0F01", (kernel_ulong_t)&upboard_up2_fpga_data },
- { "AANT0F04", (kernel_ulong_t)&upboard_up_fpga_data },
+ { .id = "AANT0F01", .driver_data = (kernel_ulong_t)&upboard_up2_fpga_data },
+ { .id = "AANT0F04", .driver_data = (kernel_ulong_t)&upboard_up_fpga_data },
{}
};
MODULE_DEVICE_TABLE(acpi, upboard_fpga_acpi_match);
--
2.56.0.rc1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v4 10/20] mfd: Use named initializers for acpi_device_id arrays
2026-11-10 21:54 ` [PATCH v4 10/20] mfd: Use named initializers for acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
@ 2026-11-11 8:45 ` Andy Shevchenko
2026-11-11 9:55 ` Uwe Kleine-König (The Capable Hub)
0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2026-11-11 8:45 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub)
Cc: Lee Jones, David Rhodes, Richard Fitzgerald, Mika Westerberg,
Zha Qipeng, Qunqin Zhao, Thomas Richard, linux-sound, patches,
mfd, linux-kernel, linux-crypto, Charles Keepax, Linus Walleij
On Tue, Nov 10, 2026 at 10:54:35PM +0100, Uwe Kleine-König (The Capable Hub) wrote:
> While being less compact, using named initializers allows to more easily
> see which members of the structs are assigned which value without having
> to lookup the declaration of the struct. And it's also more robust
> against changes to the struct definition.
>
> The mentioned robustness is relevant for a planned change to struct
> acpi_device_id that replaces .driver_data by an anonymous union.
>
> This patch doesn't modify the compiled arrays, only their representation
> in source form benefits.
I don't know who is the first, you, guys, collaborate together and come up with
a solution, but I have reviewed already this
https://lore.kernel.org/lkml/20261104-acpi-mfd-v2-0-64b9dee3baaf@thegoodpenguin.co.uk/
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 10/20] mfd: Use named initializers for acpi_device_id arrays
2026-11-11 8:45 ` Andy Shevchenko
@ 2026-11-11 9:55 ` Uwe Kleine-König (The Capable Hub)
2026-11-11 11:50 ` Pawel Zalewski
0 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-11-11 9:55 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Lee Jones, David Rhodes, Richard Fitzgerald, Mika Westerberg,
Zha Qipeng, Qunqin Zhao, Thomas Richard, linux-sound, patches,
mfd, linux-kernel, linux-crypto, Charles Keepax, Linus Walleij,
Pawel Zalewski
[-- Attachment #1: Type: text/plain, Size: 1909 bytes --]
[adding Pawel to Cc:]
Hello Andy,
On Wed, Nov 11, 2026 at 10:45:47AM +0200, Andy Shevchenko wrote:
> On Tue, Nov 10, 2026 at 10:54:35PM +0100, Uwe Kleine-König (The Capable Hub) wrote:
> > While being less compact, using named initializers allows to more easily
> > see which members of the structs are assigned which value without having
> > to lookup the declaration of the struct. And it's also more robust
> > against changes to the struct definition.
> >
> > The mentioned robustness is relevant for a planned change to struct
> > acpi_device_id that replaces .driver_data by an anonymous union.
> >
> > This patch doesn't modify the compiled arrays, only their representation
> > in source form benefits.
>
> I don't know who is the first, you, guys, collaborate together and come up with
> a solution, but I have reviewed already this
> https://lore.kernel.org/lkml/20261104-acpi-mfd-v2-0-64b9dee3baaf@thegoodpenguin.co.uk/
Oh, I wasn't aware that Pawel is still on that. Initially we had a list
where Pawel indeed was assigned for acpi_device_id. Since then I went on
to do these changes per subsystem for several *_device_id at once
(instead of per *_device_id and subsystem) and stopped looking after the
initial list. I might have mentioned that in our internal chat, but I
take the blame on the lack of coordination.
Looking through the differences I found:
- different commit log
- I have a cleanup to drivers/mfd/kempld-core.c which conflicts with
Pawel's series
@Lee: If you take Pawel's series, I can rebase and resend. Most of my
patches still apply just fine on top of Pawel's series, so you can
preempt parts of my rebase using
b4 am -P 1,2,4-6,8,9,11-15,17-20 cover.1794347059.git.u.kleine-koenig@baylibre.com
Just give me a poke when you made up your mind how to proceed and sorry
for missing that conflict.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 10/20] mfd: Use named initializers for acpi_device_id arrays
2026-11-11 9:55 ` Uwe Kleine-König (The Capable Hub)
@ 2026-11-11 11:50 ` Pawel Zalewski
0 siblings, 0 replies; 6+ messages in thread
From: Pawel Zalewski @ 2026-11-11 11:50 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub)
Cc: Andy Shevchenko, Lee Jones, David Rhodes, Richard Fitzgerald,
Mika Westerberg, Zha Qipeng, Qunqin Zhao, Thomas Richard,
linux-sound, patches, mfd, linux-kernel, linux-crypto,
Charles Keepax, Linus Walleij
> Oh, I wasn't aware that Pawel is still on that. Initially we had a list
> where Pawel indeed was assigned for acpi_device_id. Since then I went on
> to do these changes per subsystem for several *_device_id at once
> (instead of per *_device_id and subsystem) and stopped looking after the
> initial list. I might have mentioned that in our internal chat, but I
> take the blame on the lack of coordination.
Hi Uwe! My bad as well! We just had a chat and now agreed to proceed
in a coordinated way and do all *device_id changes per subsystem in
one sweep to reduce the amount of churn.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-11-11 11:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-10 21:54 [PATCH v4 00/20] mfd: Use named initializers for arrays of *_device_data Uwe Kleine-König (The Capable Hub)
2026-11-10 21:54 ` [PATCH v4 07/20] mfd: loongson-se: Drop unused assignment of acpi_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-11-10 21:54 ` [PATCH v4 10/20] mfd: Use named initializers for acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-11-11 8:45 ` Andy Shevchenko
2026-11-11 9:55 ` Uwe Kleine-König (The Capable Hub)
2026-11-11 11:50 ` Pawel Zalewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox