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.
While touching all these arrays, unify usage of whitespace in the list
terminator.
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: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260518133311.644160-2-u.kleine-koenig@baylibre.com
Signed-off-by: David Heidelberg <david@ixit.cz>
}
static const struct i2c_device_id microread_i2c_id[] = {
- { MICROREAD_I2C_DRIVER_NAME },
+ { .name = MICROREAD_I2C_DRIVER_NAME },
{ }
};
MODULE_DEVICE_TABLE(i2c, microread_i2c_id);
MODULE_DEVICE_TABLE(of, of_nfcmrvl_i2c_match);
static const struct i2c_device_id nfcmrvl_i2c_id_table[] = {
- { "nfcmrvl_i2c" },
- {}
+ { .name = "nfcmrvl_i2c" },
+ { }
};
MODULE_DEVICE_TABLE(i2c, nfcmrvl_i2c_id_table);
}
static const struct i2c_device_id nxp_nci_i2c_id_table[] = {
- { "nxp-nci_i2c" },
- {}
+ { .name = "nxp-nci_i2c" },
+ { }
};
MODULE_DEVICE_TABLE(i2c, nxp_nci_i2c_id_table);
MODULE_DEVICE_TABLE(of, of_pn533_i2c_match);
static const struct i2c_device_id pn533_i2c_id_table[] = {
- { PN533_I2C_DRIVER_NAME },
- {}
+ { .name = PN533_I2C_DRIVER_NAME },
+ { }
};
MODULE_DEVICE_TABLE(i2c, pn533_i2c_id_table);
PN544_HCI_I2C_LLC_MAX_PAYLOAD)
static const struct i2c_device_id pn544_hci_i2c_id_table[] = {
- { "pn544" },
- {}
+ { .name = "pn544" },
+ { }
};
MODULE_DEVICE_TABLE(i2c, pn544_hci_i2c_id_table);
}
static const struct i2c_device_id s3fwrn5_i2c_id_table[] = {
- { S3FWRN5_I2C_DRIVER_NAME },
- {}
+ { .name = S3FWRN5_I2C_DRIVER_NAME },
+ { }
};
MODULE_DEVICE_TABLE(i2c, s3fwrn5_i2c_id_table);
}
static const struct i2c_device_id st_nci_i2c_id_table[] = {
- { ST_NCI_DRIVER_NAME },
- {}
+ { .name = ST_NCI_DRIVER_NAME },
+ { }
};
MODULE_DEVICE_TABLE(i2c, st_nci_i2c_id_table);
}
static const struct i2c_device_id st21nfca_hci_i2c_id_table[] = {
- { ST21NFCA_HCI_DRIVER_NAME },
- {}
+ { .name = ST21NFCA_HCI_DRIVER_NAME },
+ { }
};
MODULE_DEVICE_TABLE(i2c, st21nfca_hci_i2c_id_table);