usb: dwc_otg_310: support vbus controlled by both gpio and pmic
[firefly-linux-kernel-4.4.55.git] / drivers / usb / dwc_otg_310 / dwc_otg_hcd_linux.c
old mode 100755 (executable)
new mode 100644 (file)
index e031097..d5451f0
@@ -520,7 +520,7 @@ int otg20_hcd_init(struct platform_device *_dev)
         * IRQ line, and calls hcd_start method.
         */
        irq = platform_get_irq(_dev, 0);
-       retval = usb_add_hcd(hcd, irq, IRQF_SHARED | IRQF_DISABLED);
+       retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
        if (retval < 0) {
                goto error2;
        }
@@ -612,7 +612,7 @@ int host20_hcd_init(struct platform_device *_dev)
         * IRQ line, and calls hcd_start method.
         */
        irq = platform_get_irq(_dev, 0);
-       retval = usb_add_hcd(hcd, irq, IRQF_SHARED | IRQF_DISABLED);
+       retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
        if (retval < 0) {
                goto error2;
        }
@@ -993,7 +993,7 @@ static int urb_enqueue(struct usb_hcd *hcd,
        }
 #endif
 
-       if (unlikely(atomic_read(&urb->use_count) > 1)) {
+       if (unlikely(atomic_read(&urb->use_count) > 1) && urb->hcpriv) {
                retval = -EPERM;
                printk("%s urb %p already in queue, qtd %p, use_count %d\n",
                       __func__, urb, urb->hcpriv,