mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
nfc: Initialize mei_cl_device_idarrays 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 mei_cl_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. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/cdc9bbac2e0743550970e565f57996c8a833446f.1783091699.git.u.kleine-koenig@baylibre.com Signed-off-by: David Heidelberg <david@ixit.cz>
This commit is contained in:
parent
dc0650569a
commit
15aa65539a
|
|
@ -48,10 +48,12 @@ static void microread_mei_remove(struct mei_cl_device *cldev)
|
|||
}
|
||||
|
||||
static struct mei_cl_device_id microread_mei_tbl[] = {
|
||||
{ MICROREAD_DRIVER_NAME, MEI_NFC_UUID, MEI_CL_VERSION_ANY},
|
||||
|
||||
/* required last entry */
|
||||
{ }
|
||||
{
|
||||
.name = MICROREAD_DRIVER_NAME,
|
||||
.uuid = MEI_NFC_UUID,
|
||||
.version = MEI_CL_VERSION_ANY,
|
||||
},
|
||||
{ /* required last entry */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(mei, microread_mei_tbl);
|
||||
|
||||
|
|
|
|||
|
|
@ -47,10 +47,12 @@ static void pn544_mei_remove(struct mei_cl_device *cldev)
|
|||
}
|
||||
|
||||
static struct mei_cl_device_id pn544_mei_tbl[] = {
|
||||
{ PN544_DRIVER_NAME, MEI_NFC_UUID, MEI_CL_VERSION_ANY},
|
||||
|
||||
/* required last entry */
|
||||
{ }
|
||||
{
|
||||
.name = PN544_DRIVER_NAME,
|
||||
.uuid = MEI_NFC_UUID,
|
||||
.version = MEI_CL_VERSION_ANY,
|
||||
},
|
||||
{ /* required last entry */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(mei, pn544_mei_tbl);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user