diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c index 3732e8213f83..8d078eae4dab 100644 --- a/sys/dev/usb/ukbd.c +++ b/sys/dev/usb/ukbd.c @@ -1314,19 +1314,21 @@ Static int ukbd_poll(keyboard_t *kbd, int on) { ukbd_state_t *state; + usbd_device_handle dev; int s; state = (ukbd_state_t *)kbd->kb_data; + usbd_interface2device_handle(state->ks_iface, &dev); s = splusb(); if (on) { if (state->ks_polling == 0) - usbd_set_polling(state->ks_iface, on); + usbd_set_polling(dev, on); ++state->ks_polling; } else { --state->ks_polling; if (state->ks_polling == 0) - usbd_set_polling(state->ks_iface, on); + usbd_set_polling(dev, on); } splx(s); return 0; diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 0316bdc583b1..ce177510a9ec 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1080,12 +1080,12 @@ usbd_dopoll(usbd_interface_handle iface) } void -usbd_set_polling(usbd_interface_handle iface, int on) +usbd_set_polling(usbd_device_handle dev, int on) { if (on) - iface->device->bus->use_polling++; + dev->bus->use_polling++; else - iface->device->bus->use_polling--; + dev->bus->use_polling--; } diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index f5b345801791..e772a396415d 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -160,7 +160,7 @@ usb_endpoint_descriptor_t *usbd_find_edesc(usb_config_descriptor_t *cd, int endptidx); void usbd_dopoll(usbd_interface_handle); -void usbd_set_polling(usbd_interface_handle iface, int on); +void usbd_set_polling(usbd_device_handle dev, int on); const char *usbd_errstr(usbd_status err);