From 74ba2b1af5f9840cc815390f483173f0bd40a63c Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 12 Feb 2025 11:24:02 +0100 Subject: [PATCH] (!1788) xfree86: modsetting: use explicit field initializers for XF86ModuleData Even though the order of these fields shouldn't change anytime soon, it's still better programming style to name'em explicitly. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/drivers/modesetting/driver.c | 28 +++++++++++++------------ 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c index 21358d9d5..264c6fe33 100644 --- a/hw/xfree86/drivers/modesetting/driver.c +++ b/hw/xfree86/drivers/modesetting/driver.c @@ -157,21 +157,23 @@ int ms_entity_index = -1; static MODULESETUPPROTO(Setup); static XF86ModuleVersionInfo VersRec = { - "modesetting", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - XORG_VERSION_MAJOR, - XORG_VERSION_MINOR, - XORG_VERSION_PATCH, - ABI_CLASS_VIDEODRV, - ABI_VIDEODRV_VERSION, - MOD_CLASS_VIDEODRV, - {0, 0, 0, 0} + .modname = "modesetting", + .vendor = MODULEVENDORSTRING, + ._modinfo1_ = MODINFOSTRING1, + ._modinfo1_ = MODINFOSTRING2, + .xf86version = XORG_VERSION_CURRENT, + .majorversion = XORG_VERSION_MAJOR, + .minorversion = XORG_VERSION_MINOR, + .patchlevel = XORG_VERSION_PATCH, + .abiclass = ABI_CLASS_VIDEODRV, + .abiversion = ABI_VIDEODRV_VERSION, + .moduleclass = MOD_CLASS_VIDEODRV, }; -_X_EXPORT XF86ModuleData modesettingModuleData = { &VersRec, Setup, NULL }; +_X_EXPORT XF86ModuleData modesettingModuleData = { + .vers = &VersRec, + .setup = Setup +}; static void * Setup(void *module, void *opts, int *errmaj, int *errmin)