svn commit: r355799 - head/sys/dev/kbd
Kyle Evans
kevans at FreeBSD.org
Mon Dec 16 04:52:06 UTC 2019
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);
More information about the svn-src-all
mailing list