* [PATCH 0/4] Input: use designated initializers for acpi_device_id
@ 2026-10-13 15:15 Pawel Zalewski
2026-10-13 15:15 ` [PATCH 1/4] Input: keyboard: use named " Pawel Zalewski
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Pawel Zalewski @ 2026-10-13 15:15 UTC (permalink / raw)
To: Dmitry Torokhov, Benson Leung, Guenter Roeck, Nick Dyer,
Hans de Goede
Cc: linux-input, linux-kernel, chrome-platform, platform-driver-x86,
Pawel Zalewski
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/cover.1780048925.git.u.kleine-koenig@baylibre.com/
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
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,
--
Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] Input: keyboard: use named initializers for acpi_device_id
2026-10-13 15:15 [PATCH 0/4] Input: use designated initializers for acpi_device_id Pawel Zalewski
@ 2026-10-13 15:15 ` Pawel Zalewski
2026-10-13 15:15 ` [PATCH 2/4] Input: misc: " Pawel Zalewski
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Pawel Zalewski @ 2026-10-13 15:15 UTC (permalink / raw)
To: Dmitry Torokhov, Benson Leung, Guenter Roeck, Nick Dyer,
Hans de Goede
Cc: linux-input, linux-kernel, chrome-platform, platform-driver-x86,
Pawel Zalewski
Use a designated initializer for the acpi_device_id fields which makes the
code more readable and consistent with how lists are initialized in the
rest of the kernel code base. Also drop explicitly setting fields to 0
where it is redundant.
Unify the list terminator to have a single space between the brackets and
no trailing comma.
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
drivers/input/keyboard/applespi.c | 2 +-
drivers/input/keyboard/cros_ec_keyb.c | 2 +-
drivers/input/keyboard/goldfish_events.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/input/keyboard/applespi.c b/drivers/input/keyboard/applespi.c
index b5ff71cd5a70..3d04f54c04e2 100644
--- a/drivers/input/keyboard/applespi.c
+++ b/drivers/input/keyboard/applespi.c
@@ -1904,7 +1904,7 @@ static int applespi_resume(struct device *dev)
}
static const struct acpi_device_id applespi_acpi_match[] = {
- { "APP000D", 0 },
+ { .id = "APP000D" },
{ }
};
MODULE_DEVICE_TABLE(acpi, applespi_acpi_match);
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index 177e5d4a3382..bbcca6f265b6 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -911,7 +911,7 @@ static void cros_ec_keyb_remove(struct platform_device *pdev)
#ifdef CONFIG_ACPI
static const struct acpi_device_id cros_ec_keyb_acpi_match[] = {
- { "GOOG0007", true },
+ { .id = "GOOG0007", .driver_data = true },
{ }
};
MODULE_DEVICE_TABLE(acpi, cros_ec_keyb_acpi_match);
diff --git a/drivers/input/keyboard/goldfish_events.c b/drivers/input/keyboard/goldfish_events.c
index 57d435fc5c73..d0e387f22faf 100644
--- a/drivers/input/keyboard/goldfish_events.c
+++ b/drivers/input/keyboard/goldfish_events.c
@@ -179,8 +179,8 @@ MODULE_DEVICE_TABLE(of, goldfish_events_of_match);
#ifdef CONFIG_ACPI
static const struct acpi_device_id goldfish_events_acpi_match[] = {
- { "GFSH0002", 0 },
- { },
+ { .id = "GFSH0002" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, goldfish_events_acpi_match);
#endif
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] Input: misc: use named initializers for acpi_device_id
2026-10-13 15:15 [PATCH 0/4] Input: use designated initializers for acpi_device_id Pawel Zalewski
2026-10-13 15:15 ` [PATCH 1/4] Input: keyboard: use named " Pawel Zalewski
@ 2026-10-13 15:15 ` Pawel Zalewski
2026-10-13 15:15 ` [PATCH 3/4] Input: mouse: cyapa: " Pawel Zalewski
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Pawel Zalewski @ 2026-10-13 15:15 UTC (permalink / raw)
To: Dmitry Torokhov, Benson Leung, Guenter Roeck, Nick Dyer,
Hans de Goede
Cc: linux-input, linux-kernel, chrome-platform, platform-driver-x86,
Pawel Zalewski
Use a designated initializer for the acpi_device_id fields which makes the
code more readable and consistent with how lists are initialized in the
rest of the kernel code base. Also drop explicitly setting fields to 0
where it is redundant.
Unify the list terminator to have a single space between the brackets and
no trailing comma.
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
drivers/input/misc/atlas_btns.c | 4 ++--
drivers/input/misc/drv260x.c | 2 +-
drivers/input/misc/soc_button_array.c | 12 ++++++------
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/input/misc/atlas_btns.c b/drivers/input/misc/atlas_btns.c
index 5805a1a3bb05..e77e53ee9d41 100644
--- a/drivers/input/misc/atlas_btns.c
+++ b/drivers/input/misc/atlas_btns.c
@@ -128,8 +128,8 @@ static void atlas_acpi_button_remove(struct platform_device *pdev)
}
static const struct acpi_device_id atlas_device_ids[] = {
- { "ASIM0000" },
- { "" }
+ { .id = "ASIM0000" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, atlas_device_ids);
diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
index 6c5c4c53753b..8a3d74d65d63 100644
--- a/drivers/input/misc/drv260x.c
+++ b/drivers/input/misc/drv260x.c
@@ -640,7 +640,7 @@ MODULE_DEVICE_TABLE(i2c, drv260x_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id drv260x_acpi_match[] = {
- { "DRV2604" },
+ { .id = "DRV2604" },
{ }
};
MODULE_DEVICE_TABLE(acpi, drv260x_acpi_match);
diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
index 064243677fcf..dbf86ea778e6 100644
--- a/drivers/input/misc/soc_button_array.c
+++ b/drivers/input/misc/soc_button_array.c
@@ -603,14 +603,14 @@ static const struct soc_device_data soc_device_MSHW0040 = {
};
static const struct acpi_device_id soc_button_acpi_match[] = {
- { "PNP0C40", (unsigned long)&soc_device_PNP0C40 },
- { "INT33D3", (unsigned long)&soc_device_INT33D3 },
- { "ID9001", (unsigned long)&soc_device_INT33D3 },
- { "ACPI0011", 0 },
+ { .id = "PNP0C40", .driver_data = (unsigned long)&soc_device_PNP0C40 },
+ { .id = "INT33D3", .driver_data = (unsigned long)&soc_device_INT33D3 },
+ { .id = "ID9001", .driver_data = (unsigned long)&soc_device_INT33D3 },
+ { .id = "ACPI0011" },
/* Microsoft Surface Devices (3th, 5th and 6th generation) */
- { "MSHW0028", (unsigned long)&soc_device_MSHW0028 },
- { "MSHW0040", (unsigned long)&soc_device_MSHW0040 },
+ { .id = "MSHW0028", .driver_data = (unsigned long)&soc_device_MSHW0028 },
+ { .id = "MSHW0040", .driver_data = (unsigned long)&soc_device_MSHW0040 },
{ }
};
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] Input: mouse: cyapa: use named initializers for acpi_device_id
2026-10-13 15:15 [PATCH 0/4] Input: use designated initializers for acpi_device_id Pawel Zalewski
2026-10-13 15:15 ` [PATCH 1/4] Input: keyboard: use named " Pawel Zalewski
2026-10-13 15:15 ` [PATCH 2/4] Input: misc: " Pawel Zalewski
@ 2026-10-13 15:15 ` Pawel Zalewski
2026-10-13 15:15 ` [PATCH 4/4] Input: touchscreen: " Pawel Zalewski
2026-10-14 17:51 ` [PATCH 0/4] Input: use designated " Dmitry Torokhov
4 siblings, 0 replies; 6+ messages in thread
From: Pawel Zalewski @ 2026-10-13 15:15 UTC (permalink / raw)
To: Dmitry Torokhov, Benson Leung, Guenter Roeck, Nick Dyer,
Hans de Goede
Cc: linux-input, linux-kernel, chrome-platform, platform-driver-x86,
Pawel Zalewski
Use a designated initializer for the acpi_device_id fields which makes the
code more readable and consistent with how lists are initialized in the
rest of the kernel code base. Also drop explicitly setting fields to 0
where it is redundant.
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
drivers/input/mouse/cyapa.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c
index 47000c30e4d8..8a4c78261aeb 100644
--- a/drivers/input/mouse/cyapa.c
+++ b/drivers/input/mouse/cyapa.c
@@ -1463,9 +1463,9 @@ MODULE_DEVICE_TABLE(i2c, cyapa_id_table);
#ifdef CONFIG_ACPI
static const struct acpi_device_id cyapa_acpi_id[] = {
- { "CYAP0000", 0 }, /* Gen3 trackpad with 0x67 I2C address. */
- { "CYAP0001", 0 }, /* Gen5 trackpad with 0x24 I2C address. */
- { "CYAP0002", 0 }, /* Gen6 trackpad with 0x24 I2C address. */
+ { .id = "CYAP0000" }, /* Gen3 trackpad with 0x67 I2C address. */
+ { .id = "CYAP0001" }, /* Gen5 trackpad with 0x24 I2C address. */
+ { .id = "CYAP0002" }, /* Gen6 trackpad with 0x24 I2C address. */
{ }
};
MODULE_DEVICE_TABLE(acpi, cyapa_acpi_id);
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] Input: touchscreen: use named initializers for acpi_device_id
2026-10-13 15:15 [PATCH 0/4] Input: use designated initializers for acpi_device_id Pawel Zalewski
` (2 preceding siblings ...)
2026-10-13 15:15 ` [PATCH 3/4] Input: mouse: cyapa: " Pawel Zalewski
@ 2026-10-13 15:15 ` Pawel Zalewski
2026-10-14 17:51 ` [PATCH 0/4] Input: use designated " Dmitry Torokhov
4 siblings, 0 replies; 6+ messages in thread
From: Pawel Zalewski @ 2026-10-13 15:15 UTC (permalink / raw)
To: Dmitry Torokhov, Benson Leung, Guenter Roeck, Nick Dyer,
Hans de Goede
Cc: linux-input, linux-kernel, chrome-platform, platform-driver-x86,
Pawel Zalewski
Use a designated initializer for the acpi_device_id fields which makes the
code more readable and consistent with how lists are initialized in the
rest of the kernel code base. Also drop explicitly setting fields to 0
where it is redundant.
Unify the list terminator to have a single space between the brackets and
no trailing comma.
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
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 +-
12 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 2c0e5a67135b..522e1ea405a6 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -3409,8 +3409,8 @@ MODULE_DEVICE_TABLE(of, mxt_of_match);
#ifdef CONFIG_ACPI
static const struct acpi_device_id mxt_acpi_id[] = {
- { "ATML0000", 0 }, /* Touchpad */
- { "ATML0001", 0 }, /* Touchscreen */
+ { .id = "ATML0000" }, /* Touchpad */
+ { .id = "ATML0001" }, /* Touchscreen */
{ }
};
MODULE_DEVICE_TABLE(acpi, mxt_acpi_id);
diff --git a/drivers/input/touchscreen/chipone_icn8505.c b/drivers/input/touchscreen/chipone_icn8505.c
index cde0e4789503..7d0a488166bb 100644
--- a/drivers/input/touchscreen/chipone_icn8505.c
+++ b/drivers/input/touchscreen/chipone_icn8505.c
@@ -486,7 +486,7 @@ static int icn8505_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(icn8505_pm_ops, icn8505_suspend, icn8505_resume);
static const struct acpi_device_id icn8505_acpi_match[] = {
- { "CHPN0001" },
+ { .id = "CHPN0001" },
{ }
};
MODULE_DEVICE_TABLE(acpi, icn8505_acpi_match);
diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
index 17175adcaebb..7a651899feb1 100644
--- a/drivers/input/touchscreen/elants_i2c.c
+++ b/drivers/input/touchscreen/elants_i2c.c
@@ -1360,9 +1360,9 @@ static void elants_i2c_power_off(void *_data)
#ifdef CONFIG_ACPI
static const struct acpi_device_id i2c_hid_ids[] = {
- {"ACPI0C50", 0 },
- {"PNP0C50", 0 },
- { },
+ { .id = "ACPI0C50" },
+ { .id = "PNP0C50" },
+ { }
};
static const guid_t i2c_hid_guid =
@@ -1624,7 +1624,7 @@ MODULE_DEVICE_TABLE(i2c, elants_i2c_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id elants_acpi_id[] = {
- { "ELAN0001", EKTH3500 },
+ { .id = "ELAN0001", .driver_data = EKTH3500 },
{ }
};
MODULE_DEVICE_TABLE(acpi, elants_acpi_id);
diff --git a/drivers/input/touchscreen/exc3000.c b/drivers/input/touchscreen/exc3000.c
index 037bb35238a3..d1f9b44d9d76 100644
--- a/drivers/input/touchscreen/exc3000.c
+++ b/drivers/input/touchscreen/exc3000.c
@@ -453,7 +453,7 @@ MODULE_DEVICE_TABLE(of, exc3000_of_match);
#ifdef CONFIG_ACPI
static const struct acpi_device_id exc3000_acpi_match[] = {
- { "EGA00001", .driver_data = (kernel_ulong_t)&exc3000_info[EETI_EXC80H60] },
+ { .id = "EGA00001", .driver_data = (kernel_ulong_t)&exc3000_info[EETI_EXC80H60] },
{ }
};
MODULE_DEVICE_TABLE(acpi, exc3000_acpi_match);
diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
index 03efc0c792c2..7609366f0b78 100644
--- a/drivers/input/touchscreen/goodix.c
+++ b/drivers/input/touchscreen/goodix.c
@@ -1531,10 +1531,10 @@ MODULE_DEVICE_TABLE(i2c, goodix_ts_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id goodix_acpi_match[] = {
- { "GDIX1001", 0 },
- { "GDIX1002", 0 },
- { "GDIX1003", 0 },
- { "GDX9110", 0 },
+ { .id = "GDIX1001" },
+ { .id = "GDIX1002" },
+ { .id = "GDIX1003" },
+ { .id = "GDX9110" },
{ }
};
MODULE_DEVICE_TABLE(acpi, goodix_acpi_match);
diff --git a/drivers/input/touchscreen/hideep.c b/drivers/input/touchscreen/hideep.c
index 58e00c314ace..68ee61c71df6 100644
--- a/drivers/input/touchscreen/hideep.c
+++ b/drivers/input/touchscreen/hideep.c
@@ -1088,7 +1088,7 @@ MODULE_DEVICE_TABLE(i2c, hideep_i2c_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id hideep_acpi_id[] = {
- { "HIDP0001", 0 },
+ { .id = "HIDP0001" },
{ }
};
MODULE_DEVICE_TABLE(acpi, hideep_acpi_id);
diff --git a/drivers/input/touchscreen/ilitek_ts_i2c.c b/drivers/input/touchscreen/ilitek_ts_i2c.c
index 3de0fbf8da38..cdd02b7b6f67 100644
--- a/drivers/input/touchscreen/ilitek_ts_i2c.c
+++ b/drivers/input/touchscreen/ilitek_ts_i2c.c
@@ -646,8 +646,8 @@ MODULE_DEVICE_TABLE(i2c, ilitek_ts_i2c_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id ilitekts_acpi_id[] = {
- { "ILTK0001", 0 },
- { },
+ { .id = "ILTK0001" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, ilitekts_acpi_id);
#endif
diff --git a/drivers/input/touchscreen/melfas_mip4.c b/drivers/input/touchscreen/melfas_mip4.c
index fd6c0ac301a2..0c8a922e2f2e 100644
--- a/drivers/input/touchscreen/melfas_mip4.c
+++ b/drivers/input/touchscreen/melfas_mip4.c
@@ -1529,8 +1529,8 @@ MODULE_DEVICE_TABLE(of, mip4_of_match);
#ifdef CONFIG_ACPI
static const struct acpi_device_id mip4_acpi_match[] = {
- { "MLFS0000", 0},
- { },
+ { .id = "MLFS0000" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, mip4_acpi_match);
#endif
diff --git a/drivers/input/touchscreen/raydium_i2c_ts.c b/drivers/input/touchscreen/raydium_i2c_ts.c
index 0256055abcef..d046eba4b12d 100644
--- a/drivers/input/touchscreen/raydium_i2c_ts.c
+++ b/drivers/input/touchscreen/raydium_i2c_ts.c
@@ -1227,8 +1227,8 @@ MODULE_DEVICE_TABLE(i2c, raydium_i2c_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id raydium_acpi_id[] = {
- { "RAYD0001", 0 },
- { /* sentinel */ }
+ { .id = "RAYD0001" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, raydium_acpi_id);
#endif
diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c
index 44d7141103f4..6014c4e049a6 100644
--- a/drivers/input/touchscreen/silead.c
+++ b/drivers/input/touchscreen/silead.c
@@ -788,15 +788,15 @@ MODULE_DEVICE_TABLE(i2c, silead_ts_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id silead_ts_acpi_match[] = {
- { "GSL1680", 0 },
- { "GSL1688", 0 },
- { "GSL3670", 0 },
- { "GSL3675", 0 },
- { "GSL3692", 0 },
- { "MSSL1680", 0 },
- { "MSSL0001", 0 },
- { "MSSL0002", 0 },
- { "MSSL0017", 0 },
+ { .id = "GSL1680" },
+ { .id = "GSL1688" },
+ { .id = "GSL3670" },
+ { .id = "GSL3675" },
+ { .id = "GSL3692" },
+ { .id = "MSSL1680" },
+ { .id = "MSSL0001" },
+ { .id = "MSSL0002" },
+ { .id = "MSSL0017" },
{ }
};
MODULE_DEVICE_TABLE(acpi, silead_ts_acpi_match);
diff --git a/drivers/input/touchscreen/surface3_spi.c b/drivers/input/touchscreen/surface3_spi.c
index 6074b7730e86..9d74efc8d986 100644
--- a/drivers/input/touchscreen/surface3_spi.c
+++ b/drivers/input/touchscreen/surface3_spi.c
@@ -392,7 +392,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(surface3_spi_pm_ops,
#ifdef CONFIG_ACPI
static const struct acpi_device_id surface3_spi_acpi_match[] = {
- { "MSHW0037", 0 },
+ { .id = "MSHW0037" },
{ }
};
MODULE_DEVICE_TABLE(acpi, surface3_spi_acpi_match);
diff --git a/drivers/input/touchscreen/wdt87xx_i2c.c b/drivers/input/touchscreen/wdt87xx_i2c.c
index 1af309252092..858c7efd0c29 100644
--- a/drivers/input/touchscreen/wdt87xx_i2c.c
+++ b/drivers/input/touchscreen/wdt87xx_i2c.c
@@ -1147,7 +1147,7 @@ MODULE_DEVICE_TABLE(i2c, wdt87xx_dev_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id wdt87xx_acpi_id[] = {
- { "WDHT0001", 0 },
+ { .id = "WDHT0001" },
{ }
};
MODULE_DEVICE_TABLE(acpi, wdt87xx_acpi_id);
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4] Input: use designated initializers for acpi_device_id
2026-10-13 15:15 [PATCH 0/4] Input: use designated initializers for acpi_device_id Pawel Zalewski
` (3 preceding siblings ...)
2026-10-13 15:15 ` [PATCH 4/4] Input: touchscreen: " Pawel Zalewski
@ 2026-10-14 17:51 ` Dmitry Torokhov
4 siblings, 0 replies; 6+ messages in thread
From: Dmitry Torokhov @ 2026-10-14 17:51 UTC (permalink / raw)
To: Pawel Zalewski
Cc: Benson Leung, Guenter Roeck, Nick Dyer, Hans de Goede,
linux-input, linux-kernel, chrome-platform, platform-driver-x86
On Tue, Oct 13, 2026 at 04:15:21PM +0100, Pawel Zalewski wrote:
> 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/cover.1780048925.git.u.kleine-koenig@baylibre.com/
>
> Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
Applied the lot, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-10-14 17:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 15:15 [PATCH 0/4] Input: use designated initializers for acpi_device_id Pawel Zalewski
2026-10-13 15:15 ` [PATCH 1/4] Input: keyboard: use named " Pawel Zalewski
2026-10-13 15:15 ` [PATCH 2/4] Input: misc: " Pawel Zalewski
2026-10-13 15:15 ` [PATCH 3/4] Input: mouse: cyapa: " Pawel Zalewski
2026-10-13 15:15 ` [PATCH 4/4] Input: touchscreen: " Pawel Zalewski
2026-10-14 17:51 ` [PATCH 0/4] Input: use designated " Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).