Date: Mon, 16 Dec 2019 04:52:06 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355799 - head/sys/dev/kbd Message-ID: <201912160452.xBG4q6wP000951@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Mon Dec 16 04:52:06 2019 New Revision: 355799 URL: https://svnweb.freebsd.org/changeset/base/355799 Log: kbd: patch linker set methods, too This is needed after r355796. Some double-registration of kbd drivers needs to be sorted out, then this sysinit will simply add these drivers into the normal list and kill off any other bits in the driver that are aware of the linker set, for simplicity. Modified: head/sys/dev/kbd/kbd.c Modified: head/sys/dev/kbd/kbd.c ============================================================================== --- head/sys/dev/kbd/kbd.c Mon Dec 16 03:12:53 2019 (r355798) +++ head/sys/dev/kbd/kbd.c Mon Dec 16 04:52:06 2019 (r355799) @@ -1506,3 +1506,20 @@ kbd_ev_event(keyboard_t *kbd, uint16_t type, uint16_t kbdd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay); } } + +static void +kbd_drv_init(void) +{ + const keyboard_driver_t **list; + const keyboard_driver_t *p; + + SET_FOREACH(list, kbddriver_set) { + p = *list; + if (p->kbdsw->get_fkeystr == NULL) + p->kbdsw->get_fkeystr = genkbd_get_fkeystr; + if (p->kbdsw->diag == NULL) + p->kbdsw->diag = genkbd_diag; + } +} + +SYSINIT(kbd_drv_init, SI_SUB_DRIVERS, SI_ORDER_FIRST, kbd_drv_init, NULL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912160452.xBG4q6wP000951>