summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/dev/usb/input/ukbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/dev/usb/input/ukbd.c')
-rw-r--r--freebsd/sys/dev/usb/input/ukbd.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/freebsd/sys/dev/usb/input/ukbd.c b/freebsd/sys/dev/usb/input/ukbd.c
index 76fe76b6..8fb450bc 100644
--- a/freebsd/sys/dev/usb/input/ukbd.c
+++ b/freebsd/sys/dev/usb/input/ukbd.c
@@ -367,8 +367,10 @@ static device_detach_t ukbd_detach;
static device_resume_t ukbd_resume;
#ifdef EVDEV_SUPPORT
+static evdev_event_t ukbd_ev_event;
+
static const struct evdev_methods ukbd_evdev_methods = {
- .ev_event = evdev_ev_kbd_event,
+ .ev_event = ukbd_ev_event,
};
#endif
@@ -1474,6 +1476,22 @@ ukbd_resume(device_t dev)
return (0);
}
+#ifdef EVDEV_SUPPORT
+static void
+ukbd_ev_event(struct evdev_dev *evdev, uint16_t type, uint16_t code,
+ int32_t value)
+{
+ keyboard_t *kbd = evdev_get_softc(evdev);
+
+ if (evdev_rcpt_mask & EVDEV_RCPT_HW_KBD &&
+ (type == EV_LED || type == EV_REP)) {
+ mtx_lock(&Giant);
+ kbd_ev_event(kbd, type, code, value);
+ mtx_unlock(&Giant);
+ }
+}
+#endif
+
/* early keyboard probe, not supported */
static int
ukbd_configure(int flags)