]> Git Repo - J-u-boot.git/blobdiff - common/usb_kbd.c
usb: usb_submit_int_msg -> usb_int_msg
[J-u-boot.git] / common / usb_kbd.c
index cc99c6be072044bde788380cfbf231d92a20a277..ebfd972bea0371b0c6afdd995caa9e9693f4f75b 100644 (file)
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <console.h>
 #include <dm.h>
+#include <env.h>
 #include <errno.h>
 #include <malloc.h>
 #include <memalign.h>
@@ -339,10 +340,9 @@ static inline void usb_kbd_poll_for_event(struct usb_device *dev)
        struct usb_kbd_pdata *data = dev->privptr;
 
        /* Submit a interrupt transfer request */
-       usb_submit_int_msg(dev, data->intpipe, &data->new[0], data->intpktsize,
-                          data->intinterval);
-
-       usb_kbd_irq_worker(dev);
+       if (usb_int_msg(dev, data->intpipe, &data->new[0],
+                       data->intpktsize, data->intinterval) >= 0)
+               usb_kbd_irq_worker(dev);
 #elif defined(CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP) || \
       defined(CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE)
 #if defined(CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP)
@@ -504,8 +504,8 @@ static int usb_kbd_probe_dev(struct usb_device *dev, unsigned int ifnum)
        if (usb_get_report(dev, iface->desc.bInterfaceNumber,
                           1, 0, data->new, USB_KBD_BOOT_REPORT_SIZE) < 0) {
 #else
-       if (usb_submit_int_msg(dev, data->intpipe, data->new, data->intpktsize,
-                              data->intinterval) < 0) {
+       if (usb_int_msg(dev, data->intpipe, data->new, data->intpktsize,
+                       data->intinterval) < 0) {
 #endif
                printf("Failed to get keyboard state from device %04x:%04x\n",
                       dev->descriptor.idVendor, dev->descriptor.idProduct);
This page took 0.038376 seconds and 4 git commands to generate.