kdrive: ephyr: use c99 struct initialization

For better readability and robustness against future changes, it's
better to use named struct initializers instead of array-like lists.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
stefan11111 2025-06-30 13:44:54 +03:00 committed by Enrico Weigelt
parent 6c2f17a5e0
commit 3d266528a9
2 changed files with 23 additions and 29 deletions

View File

@ -1435,12 +1435,11 @@ MouseFini(KdPointerInfo * pi)
}
KdPointerDriver EphyrMouseDriver = {
"ephyr",
MouseInit,
MouseEnable,
MouseDisable,
MouseFini,
NULL,
.name = "ephyr",
.Init = MouseInit,
.Enable = MouseEnable,
.Disable = MouseDisable,
.Fini = MouseFini,
};
/* Keyboard */
@ -1509,12 +1508,11 @@ EphyrKeyboardBell(KdKeyboardInfo * ki, int volume, int frequency, int duration)
}
KdKeyboardDriver EphyrKeyboardDriver = {
"ephyr",
EphyrKeyboardInit,
EphyrKeyboardEnable,
EphyrKeyboardLeds,
EphyrKeyboardBell,
EphyrKeyboardDisable,
EphyrKeyboardFini,
NULL,
.name = "ephyr",
.Init = EphyrKeyboardInit,
.Enable = EphyrKeyboardEnable,
.Leds = EphyrKeyboardLeds,
.Bell = EphyrKeyboardBell,
.Disable = EphyrKeyboardDisable,
.Fini = EphyrKeyboardFini,
};

View File

@ -390,23 +390,19 @@ OsVendorInit(void)
}
KdCardFuncs ephyrFuncs = {
ephyrCardInit, /* cardinit */
ephyrScreenInitialize, /* scrinit */
ephyrInitScreen, /* initScreen */
ephyrFinishInitScreen, /* finishInitScreen */
ephyrCreateResources, /* createRes */
ephyrScreenFini, /* scrfini */
ephyrCardFini, /* cardfini */
.cardinit = ephyrCardInit,
.scrinit = ephyrScreenInitialize,
.initScreen = ephyrInitScreen,
.finishInitScreen = ephyrFinishInitScreen,
.createRes = ephyrCreateResources,
0, /* initCursor */
.scrfini = ephyrScreenFini,
.cardfini = ephyrCardFini,
0, /* initAccel */
0, /* enableAccel */
0, /* disableAccel */
0, /* finiAccel */
/* no cursor or accel funcs here */
ephyrGetColors, /* getColors */
ephyrPutColors, /* putColors */
.getColors = ephyrGetColors,
.putColors = ephyrPutColors,
ephyrCloseScreen, /* closeScreen */
.closeScreen = ephyrCloseScreen,
};