mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
nfc: Initialize acpi_device_id arrays using member names
While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition. The mentioned robustness is relevant for a planned change to struct acpi_device_id that replaces .driver_data by an anonymous union. This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Ian Ray <ian.ray@gehealthcare.com> Link: https://patch.msgid.link/5f60cd3e9831aac3995ed1a1b074ca1ae32e5286.1783091699.git.u.kleine-koenig@baylibre.com Signed-off-by: David Heidelberg <david@ixit.cz>
This commit is contained in:
parent
23096d9848
commit
42d470a98e
|
|
@ -349,7 +349,7 @@ static void fdp_nci_i2c_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct acpi_device_id fdp_nci_i2c_acpi_match[] = {
|
||||
{ "INT339A" },
|
||||
{ .id = "INT339A" },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, fdp_nci_i2c_acpi_match);
|
||||
|
|
|
|||
|
|
@ -364,9 +364,9 @@ MODULE_DEVICE_TABLE(of, of_nxp_nci_i2c_match);
|
|||
|
||||
#ifdef CONFIG_ACPI
|
||||
static const struct acpi_device_id acpi_id[] = {
|
||||
{ "NXP1001" },
|
||||
{ "NXP1002" },
|
||||
{ "NXP7471" },
|
||||
{ .id = "NXP1001" },
|
||||
{ .id = "NXP1002" },
|
||||
{ .id = "NXP7471" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, acpi_id);
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ static const struct i2c_device_id pn544_hci_i2c_id_table[] = {
|
|||
MODULE_DEVICE_TABLE(i2c, pn544_hci_i2c_id_table);
|
||||
|
||||
static const struct acpi_device_id pn544_hci_i2c_acpi_match[] = {
|
||||
{ "NXP5440" },
|
||||
{ .id = "NXP5440" },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, pn544_hci_i2c_acpi_match);
|
||||
|
|
|
|||
|
|
@ -263,8 +263,8 @@ static const struct i2c_device_id st_nci_i2c_id_table[] = {
|
|||
MODULE_DEVICE_TABLE(i2c, st_nci_i2c_id_table);
|
||||
|
||||
static const struct acpi_device_id st_nci_i2c_acpi_match[] = {
|
||||
{"SMO2101"},
|
||||
{"SMO2102"},
|
||||
{ .id = "SMO2101" },
|
||||
{ .id = "SMO2102" },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, st_nci_i2c_acpi_match);
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ static struct spi_device_id st_nci_spi_id_table[] = {
|
|||
MODULE_DEVICE_TABLE(spi, st_nci_spi_id_table);
|
||||
|
||||
static const struct acpi_device_id st_nci_spi_acpi_match[] = {
|
||||
{ "SMO2101" },
|
||||
{ .id = "SMO2101" },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, st_nci_spi_acpi_match);
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@ static const struct i2c_device_id st21nfca_hci_i2c_id_table[] = {
|
|||
MODULE_DEVICE_TABLE(i2c, st21nfca_hci_i2c_id_table);
|
||||
|
||||
static const struct acpi_device_id st21nfca_hci_i2c_acpi_match[] = {
|
||||
{ "SMO2100" },
|
||||
{ .id = "SMO2100" },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, st21nfca_hci_i2c_acpi_match);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user