Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/hil Use C99 designated initializer for wscons ops.



details:   https://anonhg.NetBSD.org/src/rev/7cb0f88641b6
branches:  trunk
changeset: 1023626:7cb0f88641b6
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Sep 19 04:55:58 2021 +0000

description:
Use C99 designated initializer for wscons ops.

diffstat:

 sys/dev/hil/hilkbd.c |  28 +++++++++++++++-------------
 sys/dev/hil/hilms.c  |   8 ++++----
 2 files changed, 19 insertions(+), 17 deletions(-)

diffs (82 lines):

diff -r 82a56f5d3f0b -r 7cb0f88641b6 sys/dev/hil/hilkbd.c
--- a/sys/dev/hil/hilkbd.c      Sat Sep 18 23:54:13 2021 +0000
+++ b/sys/dev/hil/hilkbd.c      Sun Sep 19 04:55:58 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hilkbd.c,v 1.6 2021/08/07 16:19:11 thorpej Exp $       */
+/*     $NetBSD: hilkbd.c,v 1.7 2021/09/19 04:55:58 tsutsui Exp $       */
 /*     $OpenBSD: hilkbd.c,v 1.14 2009/01/21 21:53:59 grange Exp $      */
 /*
  * Copyright (c) 2003, Miodrag Vallat.
@@ -79,9 +79,9 @@
 static int     hilkbd_ioctl(void *, u_long, void *, int, struct lwp *);
 
 static const struct wskbd_accessops hilkbd_accessops = {
-       hilkbd_enable,
-       hilkbd_set_leds,
-       hilkbd_ioctl,
+       .enable   = hilkbd_enable,
+       .set_leds = hilkbd_set_leds,
+       .ioctl    = hilkbd_ioctl,
 };
 
 static void    hilkbd_cngetc(void *, u_int *, int *);
@@ -89,26 +89,28 @@
 static void    hilkbd_cnbell(void *, u_int, u_int, u_int);
 
 static const struct wskbd_consops hilkbd_consops = {
-       hilkbd_cngetc,
-       hilkbd_cnpollc,
-       hilkbd_cnbell,
+       .getc  = hilkbd_cngetc,
+       .pollc = hilkbd_cnpollc,
+       .bell  = hilkbd_cnbell,
 };
 
 static struct wskbd_mapdata hilkbd_keymapdata = {
-       hilkbd_keydesctab,
+       .keydesc = hilkbd_keydesctab,
+       .layout  =
 #ifdef HILKBD_LAYOUT
-       HILKBD_LAYOUT,
+           HILKBD_LAYOUT,
 #else
-       KB_US,
+           KB_US,
 #endif
 };
 
 static struct wskbd_mapdata hilkbd_keymapdata_ps2 = {
-       hilkbd_keydesctab_ps2,
+       .keydesc = hilkbd_keydesctab_ps2,
+       .layout = 
 #ifdef HILKBD_LAYOUT
-       HILKBD_LAYOUT,
+           HILKBD_LAYOUT,
 #else
-       KB_US,
+           KB_US,
 #endif
 };
 
diff -r 82a56f5d3f0b -r 7cb0f88641b6 sys/dev/hil/hilms.c
--- a/sys/dev/hil/hilms.c       Sat Sep 18 23:54:13 2021 +0000
+++ b/sys/dev/hil/hilms.c       Sun Sep 19 04:55:58 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hilms.c,v 1.4 2021/08/07 16:19:11 thorpej Exp $        */
+/*     $NetBSD: hilms.c,v 1.5 2021/09/19 04:55:58 tsutsui Exp $        */
 /*     $OpenBSD: hilms.c,v 1.5 2007/04/10 22:37:17 miod Exp $  */
 /*
  * Copyright (c) 2003, Miodrag Vallat.
@@ -67,9 +67,9 @@
 static void    hilms_disable(void *);
 
 static const struct wsmouse_accessops hilms_accessops = {
-       hilms_enable,
-       hilms_ioctl,
-       hilms_disable,
+       .enable  = hilms_enable,
+       .ioctl   = hilms_ioctl,
+       .disable = hilms_disable,
 };
 
 static void    hilms_callback(struct hildev_softc *, u_int, uint8_t *);



Home | Main Index | Thread Index | Old Index