Skip to content

Input: use designated initializers for acpi_device_id

Pawel Zalewski chrome-platform linux-input lkml platform-driver-x86 1 version In review

Get series with b4
b4 am [email protected] change-id 20261013-acpi-input-2ed24d864410

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Input: keyboard: use named initializers for acpi_device_iddrivers/input/keyboard/applespi.c drivers/input/keyboard/cros_ec_keyb.c drivers/input/keyboard/goldfish_events.c+4 -40 replies
2/4Input: misc: use named initializers for acpi_device_iddrivers/input/misc/atlas_btns.c drivers/input/misc/drv260x.c drivers/input/misc/soc_button_array.c+9 -90 replies
3/4Input: mouse: cyapa: use named initializers for acpi_device_iddrivers/input/mouse/cyapa.c+3 -30 replies
4/4Input: touchscreen: use named initializers for acpi_device_iddrivers/input/touchscreen/atmel_mxt_ts.c drivers/input/touchscreen/chipone_icn8505.c drivers/input/touchscreen/elants_i2c.c +9 more+30 -300 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Input: use designated initializers for acpi_device_id

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-rc7.

[1] https://lore.kernel.org/all/[email protected]/

---
Pawel Zalewski (4):
Input: keyboard: use named initializers for acpi_device_id
Input: misc: use named initializers for acpi_device_id
Input: mouse: cyapa: use named initializers for acpi_device_id
Input: touchscreen: use named initializers for acpi_device_id

 drivers/input/keyboard/applespi.c           |  2 +-
 drivers/input/keyboard/cros_ec_keyb.c       |  2 +-
 drivers/input/keyboard/goldfish_events.c    |  4 ++--
 drivers/input/misc/atlas_btns.c             |  4 ++--
 drivers/input/misc/drv260x.c                |  2 +-
 drivers/input/misc/soc_button_array.c       | 12 ++++++------
 drivers/input/mouse/cyapa.c                 |  6 +++---
 drivers/input/touchscreen/atmel_mxt_ts.c    |  4 ++--
 drivers/input/touchscreen/chipone_icn8505.c |  2 +-
 drivers/input/touchscreen/elants_i2c.c      |  8 ++++----
 drivers/input/touchscreen/exc3000.c         |  2 +-
 drivers/input/touchscreen/goodix.c          |  8 ++++----
 drivers/input/touchscreen/hideep.c          |  2 +-
 drivers/input/touchscreen/ilitek_ts_i2c.c   |  4 ++--
 drivers/input/touchscreen/melfas_mip4.c     |  4 ++--
 drivers/input/touchscreen/raydium_i2c_ts.c  |  4 ++--
 drivers/input/touchscreen/silead.c          | 18 +++++++++---------
 drivers/input/touchscreen/surface3_spi.c    |  2 +-
 drivers/input/touchscreen/wdt87xx_i2c.c     |  2 +-
 19 files changed, 46 insertions(+), 46 deletions(-)

---
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
change-id: 20261013-acpi-input-2ed24d864410

Best regards,

Signature · 1 line
Pawel Zalewski <[email protected]>