From e7f8b63997e3dbbeb2f3f845a84ea6cc924f6c1e Mon Sep 17 00:00:00 2001 From: Pawel Zalewski Date: Tue, 13 Oct 2026 16:15:23 +0100 Subject: [PATCH] Input: misc - use named initializers for acpi_device_id 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 Link: https://patch.msgid.link/20261013-acpi-input-v1-2-53ad09ba82b7@thegoodpenguin.co.uk Signed-off-by: Dmitry Torokhov --- 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 b8cad415c62c..2a4f7dd95e99 100644 --- a/drivers/input/misc/soc_button_array.c +++ b/drivers/input/misc/soc_button_array.c @@ -596,14 +596,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 }, { } };