wscons: struct wssrcops initializers

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

wscons: struct wssrcops initializers

Anton Lindqvist-2
Hi,
Favor C99 initializers for struct wssrcops; improves grepability.

Comments? OK?

Index: dev/wscons/wskbd.c
===================================================================
RCS file: /cvs/src/sys/dev/wscons/wskbd.c,v
retrieving revision 1.95
diff -u -p -r1.95 wskbd.c
--- dev/wscons/wskbd.c 1 Feb 2019 07:02:31 -0000 1.95
+++ dev/wscons/wskbd.c 18 Feb 2019 17:48:38 -0000
@@ -279,13 +279,15 @@ struct wskbd_keyrepeat_data wskbd_defaul
 
 #if NWSMUX > 0 || NWSDISPLAY > 0
 struct wssrcops wskbd_srcops = {
- WSMUX_KBD,
- wskbd_mux_open, wskbd_mux_close, wskbd_do_ioctl,
- wskbd_displayioctl,
+ .type = WSMUX_KBD,
+ .dopen = wskbd_mux_open,
+ .dclose = wskbd_mux_close,
+ .dioctl = wskbd_do_ioctl,
+ .ddispioctl = wskbd_displayioctl,
 #if NWSDISPLAY > 0
- wskbd_set_display
+ .dsetdisplay = wskbd_set_display,
 #else
- NULL
+ .dsetdisplay = NULL,
 #endif
 };
 #endif
Index: dev/wscons/wsmouse.c
===================================================================
RCS file: /cvs/src/sys/dev/wscons/wsmouse.c,v
retrieving revision 1.50
diff -u -p -r1.50 wsmouse.c
--- dev/wscons/wsmouse.c 20 Nov 2018 19:33:44 -0000 1.50
+++ dev/wscons/wsmouse.c 18 Feb 2019 17:48:38 -0000
@@ -168,8 +168,12 @@ struct cfattach wsmouse_ca = {
 
 #if NWSMUX > 0
 struct wssrcops wsmouse_srcops = {
- WSMUX_MOUSE,
- wsmouse_mux_open, wsmouse_mux_close, wsmousedoioctl, NULL, NULL
+ .type = WSMUX_MOUSE,
+ .dopen = wsmouse_mux_open,
+ .dclose = wsmouse_mux_close,
+ .dioctl = wsmousedoioctl,
+ .ddispioctl = NULL,
+ .dsetdisplay = NULL,
 };
 #endif
 
Index: dev/wscons/wsmux.c
===================================================================
RCS file: /cvs/src/sys/dev/wscons/wsmux.c,v
retrieving revision 1.39
diff -u -p -r1.39 wsmux.c
--- dev/wscons/wsmux.c 18 Feb 2019 17:39:14 -0000 1.39
+++ dev/wscons/wsmux.c 18 Feb 2019 17:48:38 -0000
@@ -108,9 +108,12 @@ void wsmuxattach(int);
 void wsmux_detach_sc_locked(struct wsmux_softc *, struct wsevsrc *);
 
 struct wssrcops wsmux_srcops = {
- WSMUX_MUX,
- wsmux_mux_open, wsmux_mux_close, wsmux_do_ioctl, wsmux_do_displayioctl,
- wsmux_evsrc_set_display
+ .type = WSMUX_MUX,
+ .dopen = wsmux_mux_open,
+ .dclose = wsmux_mux_close,
+ .dioctl = wsmux_do_ioctl,
+ .ddispioctl = wsmux_do_displayioctl,
+ .dsetdisplay = wsmux_evsrc_set_display,
 };
 
 /* From upper level */