[PATCH 00/12] iio: use designated initializers for acpi_device_id

From: Pawel Zalewski

Date: Mon Oct 05 2026 - 10:05:57 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.

Tested builds on x86-64 and a64 in Yocto using 7.3-rc6.

[1] https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@xxxxxxxxxxxx/

Signed-off-by: Pawel Zalewski <pzalewski@xxxxxxxxxxxxxxxxxxxx>
---
Pawel Zalewski (12):
iio: accel: use named initializers for acpi_device_id
iio: adc: use named initializers for acpi_device_id
iio: dac: use named initializers for acpi_device_id
iio: gyro: bmg160_i2c: use named initializers for acpi_device_id
iio: humidity: use named initializers for acpi_device_id
iio: imu: use named initializers for acpi_device_id
iio: light: use named initializers for acpi_device_id
iio: magnetometer: use named initializers for acpi_device_id
iio: potentiometer: max5487: use named initializers for acpi_device_id
iio: pressure: use named initializers for acpi_device_id
iio: proximity: use named initializers for acpi_device_id
iio: temperature: max30208: use named initializers for acpi_device_id

drivers/iio/accel/adxl345_i2c.c | 2 +-
drivers/iio/accel/adxl345_spi.c | 2 +-
drivers/iio/accel/bma220_spi.c | 2 +-
drivers/iio/accel/bmc150-accel-i2c.c | 24 ++++++++++++------------
drivers/iio/accel/bmc150-accel-spi.c | 16 ++++++++--------
drivers/iio/accel/da280.c | 4 ++--
drivers/iio/accel/kxcjk-1013.c | 22 +++++++++++-----------
drivers/iio/accel/mma7660.c | 2 +-
drivers/iio/accel/mma9551.c | 2 +-
drivers/iio/accel/mma9553.c | 2 +-
drivers/iio/accel/mxc4005.c | 6 +++---
drivers/iio/accel/mxc6255.c | 4 ++--
drivers/iio/accel/st_accel_i2c.c | 4 ++--
drivers/iio/accel/stk8ba50.c | 2 +-
drivers/iio/adc/ad7298.c | 2 +-
drivers/iio/adc/pac1921.c | 2 +-
drivers/iio/adc/pac1934.c | 2 +-
drivers/iio/adc/ti-adc081c.c | 2 +-
drivers/iio/adc/ti-adc108s102.c | 2 +-
drivers/iio/adc/ti-adc128s052.c | 2 +-
drivers/iio/dac/ad5592r.c | 2 +-
drivers/iio/dac/ad5593r.c | 2 +-
drivers/iio/gyro/bmg160_i2c.c | 2 +-
drivers/iio/humidity/hdc100x.c | 2 +-
drivers/iio/humidity/hts221_i2c.c | 2 +-
drivers/iio/imu/bmi160/bmi160_i2c.c | 6 +++---
drivers/iio/imu/bmi160/bmi160_spi.c | 4 ++--
drivers/iio/imu/bmi270/bmi270_i2c.c | 4 ++--
drivers/iio/imu/bmi323/bmi323_i2c.c | 2 +-
drivers/iio/imu/fxos8700_i2c.c | 2 +-
drivers/iio/imu/fxos8700_spi.c | 2 +-
drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 2 +-
drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 2 +-
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 4 ++--
drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c | 2 +-
drivers/iio/light/acpi-als.c | 2 +-
drivers/iio/light/al3320a.c | 2 +-
drivers/iio/light/apds9960.c | 2 +-
drivers/iio/light/cm32181.c | 2 +-
drivers/iio/light/isl29018.c | 6 +++---
drivers/iio/light/jsa1212.c | 2 +-
drivers/iio/light/ltr501.c | 4 ++--
drivers/iio/light/max44000.c | 2 +-
drivers/iio/light/pa12203001.c | 2 +-
drivers/iio/light/rpr0521.c | 2 +-
drivers/iio/light/stk3310.c | 6 +++---
drivers/iio/light/us5182d.c | 2 +-
drivers/iio/magnetometer/ak8975.c | 14 +++++++-------
drivers/iio/magnetometer/mmc35240.c | 2 +-
drivers/iio/potentiometer/max5487.c | 6 +++---
drivers/iio/pressure/dps310.c | 2 +-
drivers/iio/pressure/hp206c.c | 2 +-
drivers/iio/pressure/st_pressure_i2c.c | 2 +-
drivers/iio/proximity/sx9310.c | 4 ++--
drivers/iio/proximity/sx9500.c | 4 ++--
drivers/iio/temperature/max30208.c | 2 +-
56 files changed, 109 insertions(+), 109 deletions(-)
---
base-commit: a90ee4305c4a5df72c11b31dacfdc76e00fcf78a
change-id: 20260929-acpi-iio-0a8198cd3198

Best regards,
--
Pawel Zalewski <pzalewski@xxxxxxxxxxxxxxxxxxxx>