[PATCH v2 08/12] misc: mei: Use named initializer for platform_device_id array
From: Uwe Kleine-König (The Capable Hub)
Date: Fri Jul 17 2026 - 10:56:35 EST
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
platform_device_id that replaces .driver_data by an anonymous union (though
this driver doesn't use .driver_data, so this patch isn't strictly
necessary for the plan, but still ok for consistency).
This patch doesn't modify the compiled array, only its representation
in source form benefits.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
---
drivers/misc/mei/platform-vsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/mei/platform-vsc.c b/drivers/misc/mei/platform-vsc.c
index 5100234ba5b6..ef6dcc043862 100644
--- a/drivers/misc/mei/platform-vsc.c
+++ b/drivers/misc/mei/platform-vsc.c
@@ -435,7 +435,7 @@ static int mei_vsc_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(mei_vsc_pm_ops, mei_vsc_suspend, mei_vsc_resume);
static const struct platform_device_id mei_vsc_id_table[] = {
- { MEI_VSC_DRV_NAME },
+ { .name = MEI_VSC_DRV_NAME },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(platform, mei_vsc_id_table);
--
2.55.0.11.g153666a7d9bb