diff options
| author | Kazutaka YOKOTA <yokota@FreeBSD.org> | 2001-06-30 10:02:32 +0000 |
|---|---|---|
| committer | Kazutaka YOKOTA <yokota@FreeBSD.org> | 2001-06-30 10:02:32 +0000 |
| commit | 6c726162da6e9ace516d90f7c88faa0d5670ebb2 (patch) | |
| tree | 99765e0b6d606fe48d9c02a515750685c8614441 /sys/dev/usb/ukbd.c | |
| parent | 1036bb970ac67adb75d95a1844aa6c1e781fd75e (diff) | |
Notes
Diffstat (limited to 'sys/dev/usb/ukbd.c')
| -rw-r--r-- | sys/dev/usb/ukbd.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c index 9f3143ae0c427..b127b8aa6044a 100644 --- a/sys/dev/usb/ukbd.c +++ b/sys/dev/usb/ukbd.c @@ -113,10 +113,11 @@ typedef struct ukbd_softc { typedef void usbd_intr_t(usbd_xfer_handle, usbd_private_handle, usbd_status); typedef void usbd_disco_t(void *); +Static int ukbd_resume(device_t self); Static usbd_intr_t ukbd_intr; Static int ukbd_driver_load(module_t mod, int what, void *arg); -USB_DECLARE_DRIVER(ukbd); +USB_DECLARE_DRIVER_INIT(ukbd, DEVMETHOD(device_resume, ukbd_resume)); USB_MATCH(ukbd) { @@ -207,6 +208,18 @@ ukbd_detach(device_t self) return (0); } +Static int +ukbd_resume(device_t self) +{ + keyboard_t *kbd; + + kbd = kbd_get_keyboard(kbd_find_keyboard(DRIVER_NAME, + device_get_unit(self))); + if (kbd) + (*kbdsw[kbd->kb_index]->clear_state)(kbd); + return (0); +} + void ukbd_intr(usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status) { |
