[PATCH 1/4] Input: keyboard: use named initializers for acpi_device_id
From: Pawel Zalewski
Date: Tue Oct 13 2026 - 13:02:42 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/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