usb: musb: Fix for merge issue
authorHema HK <hemahk@ti.com>
Thu, 17 Mar 2011 10:41:58 +0000 (16:11 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Mar 2011 20:14:17 +0000 (13:14 -0700)
There was conflict while merging 2 patches. Enabling vbus code
is wrongly moved to error check if loop.

This is a fix to resolve the merge issue.

Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/musb/musb_gadget.c

index 5c7b321..98519c5 100644 (file)
@@ -1880,12 +1880,12 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
                if (retval < 0) {
                        DBG(1, "add_hcd failed, %d\n", retval);
                        goto err2;
-
-                       if ((musb->xceiv->last_event == USB_EVENT_ID)
-                                               && musb->xceiv->set_vbus)
-                               otg_set_vbus(musb->xceiv, 1);
                }
 
+               if ((musb->xceiv->last_event == USB_EVENT_ID)
+                                       && musb->xceiv->set_vbus)
+                       otg_set_vbus(musb->xceiv, 1);
+
                hcd->self.uses_pio_for_control = 1;
 
                if (musb->xceiv->last_event == USB_EVENT_NONE)