[PATCH 2/4] Input: misc: use named initializers for acpi_device_id

From: Pawel Zalewski

Date: Tue Oct 13 2026 - 15:46:17 EST


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@xxxxxxxxxxxxxxxxxxxx>
---
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