[adm5120] add Edimax BR-61x4WG board support to the LED driver, thanks to scream_...
[openwrt-10.03/.git] / target / linux / adm5120 / files / drivers / usb / host / adm5120-hcd.c
index 30fe132d99fa5a293827f6d0647d804a31ac12a3..59fd6717560736127588189ae752d0cbb37b9d52 100644 (file)
@@ -45,7 +45,7 @@
 #include "../core/hcd.h"
 #include "../core/hub.h"
 
-#define DRIVER_VERSION "v0.10"
+#define DRIVER_VERSION "v0.14.0"
 #define DRIVER_AUTHOR  "Gabor Juhos <juhosg at openwrt.org>"
 #define DRIVER_DESC    "ADMtek USB 1.1 Host Controller Driver"
 
@@ -142,10 +142,6 @@ static int admhc_urb_enqueue(struct usb_hcd *hcd, struct usb_host_endpoint *ep,
                /* number of packets from URB */
                td_cnt = urb->number_of_packets;
                break;
-       default:
-               /* paranoia */
-               admhc_err(ahcd, "bad EP type %d", ed->type);
-               return -EINVAL;
        }
 
        urb_priv = urb_priv_alloc(ahcd, td_cnt, mem_flags);
@@ -207,6 +203,7 @@ static int admhc_urb_enqueue(struct usb_hcd *hcd, struct usb_host_endpoint *ep,
 #ifdef ADMHC_VERBOSE_DEBUG
        admhc_dump_ed(ahcd, "admhc_urb_enqueue", urb_priv->ed, 1);
 #endif
+
 fail0:
        spin_unlock(&urb->lock);
 fail:
@@ -228,11 +225,12 @@ static int admhc_urb_dequeue(struct usb_hcd *hcd, struct urb *urb)
        struct admhcd *ahcd = hcd_to_admhcd(hcd);
        unsigned long flags;
 
+       spin_lock_irqsave(&ahcd->lock, flags);
+
 #ifdef ADMHC_VERBOSE_DEBUG
        urb_print(ahcd, urb, "DEQUEUE", 1);
 #endif
 
-       spin_lock_irqsave(&ahcd->lock, flags);
        if (HC_IS_RUNNING(hcd->state)) {
                struct urb_priv *urb_priv;