[PATCH v2 0/2] mfd: use designated initializers for acpi_device_id
From: Pawel Zalewski
Date: Wed Nov 04 2026 - 11:16:10 EST
This series is converting lists that contain the acpi_device_id struct,
which is defined in the include/linux/device-id/acpi.h to make use of named
initializers (which they do not use currently). This work is part of the on
going effort in the kernel associated with device-ids [1]
The plan is to convert acpi_device_id::driver_data to have an anonymous
union, similarly to what was introduced for PCI and I2C device ID tables.
The goal is to increase type-safety (most of the existing casts are gone),
to improve readability and to make use intent a bit more clear:
```
union {
kernel_ulong_t driver_data;
const void *driver_data_ptr;
}
```
But for that to work all lists containing the structs need to use named
initializers first to avoid triggering -Wmissing-braces. I already have
patches that implement this and touching a lot of kernel subsystmes that
use the acpi_device_id struct and that list keeps on growing. Therefore,
I have decided to split the series per every subsystem into:
- pre-clean-ups that convert the lists to use named initializers
(which is this series)
- actual implementations that make some of the modules use the new
driver_data_ptr member
That way the task can be fragmented into manageable and independent chunks
of work and makes this effort easier to review.
[1] https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@xxxxxxxxxxxx/
Signed-off-by: Pawel Zalewski <pzalewski@xxxxxxxxxxxxxxxxxxxx>
---
Changes in v2:
- Split Intel LPSS into its own patch.
- Added a review tag from V1.
- Link to v1: https://patch.msgid.link/20261102-acpi-mfd-v1-1-d61029971be8@xxxxxxxxxxxxxxxxxxxx
To: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
To: Lee Jones <lee@xxxxxxxxxx>
To: Chen-Yu Tsai <wens@xxxxxxxxxx>
To: David Rhodes <david.rhodes@xxxxxxxxxx>
To: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
To: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
To: Zha Qipeng <qipeng.zha@xxxxxxxxx>
To: Andy Shevchenko <andy@xxxxxxxxxx>
To: Qunqin Zhao <zhaoqunqin@xxxxxxxxxxx>
To: Thomas Richard <thomas.richard@xxxxxxxxxxx>
Cc: mfd@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-sound@xxxxxxxxxxxxxxx
Cc: patches@xxxxxxxxxxxxxxxxxxxxx
Cc: linux-crypto@xxxxxxxxxxxxxxx
---
Pawel Zalewski (2):
mfd: intel-lpss-acpi: Use named initializers for acpi_device_id
mfd: Use named initializers for acpi_device_id
drivers/mfd/axp20x-i2c.c | 2 +-
drivers/mfd/cs42l43-i2c.c | 8 ++---
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 | 4 +--
drivers/mfd/intel_soc_pmic_chtwc.c | 2 +-
drivers/mfd/intel_soc_pmic_crc.c | 4 +--
drivers/mfd/intel_soc_pmic_mrfld.c | 4 +--
drivers/mfd/kempld-core.c | 6 ++--
drivers/mfd/loongson-se.c | 2 +-
drivers/mfd/upboard-fpga.c | 6 ++--
12 files changed, 50 insertions(+), 50 deletions(-)
---
base-commit: 05441d697f7f9a927264f4058cbbc6a03dfcac9d
change-id: 20261030-acpi-mfd-a6ac9d16671b
Best regards,
--
Pawel Zalewski <pzalewski@xxxxxxxxxxxxxxxxxxxx>