mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
misc: mei: Use named initializer for platform_device_id array
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@baylibre.com> Link: https://patch.msgid.link/9c4a5a5b086d4ce913e84dfa7d140a8b492d557b.1784299069.git.u.kleine-koenig@baylibre.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3cd092ac55
commit
14e8c32dbc
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user