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 <pzalewski@thegoodpenguin.co.uk>
Link: https://patch.msgid.link/20261013-acpi-input-v1-2-53ad09ba82b7@thegoodpenguin.co.uk
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
Pawel Zalewski 2026-10-13 16:15:23 +01:00 committed by Dmitry Torokhov
parent 2e3600723a
commit e7f8b63997
3 changed files with 9 additions and 9 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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 },
{ }
};