[PATCH 0/3] HID: use designated initializers for acpi_device_id
From: Pawel Zalewski
Date: Tue Sep 08 2026 - 05:28:08 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 (does not apply here in the HID subsystem).
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-rc2.
[1] https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@xxxxxxxxxxxx/
Signed-off-by: Pawel Zalewski <pzalewski@xxxxxxxxxxxxxxxxxxxx>
---
Pawel Zalewski (3):
HID: hid-google-hammer: use named initializers for acpi_device_id
HID: i2c-hid: use named initializers for acpi_device_id
HID: surface-hid: use named initializers for acpi_device_id
drivers/hid/hid-google-hammer.c | 2 +-
drivers/hid/i2c-hid/i2c-hid-acpi.c | 8 ++++----
drivers/hid/surface-hid/surface_kbd.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
---
base-commit: 28924df2a08f440c73991b83028032c901de2ae4
change-id: 20260908-acpi-hid-4305ca77f0a6
Best regards,
--
Pawel Zalewski <pzalewski@xxxxxxxxxxxxxxxxxxxx>