usb: gadget: fsl_udc: avoid can_pullup function in vbus_session
Preetham Chandru [Wed, 15 Feb 2012 14:39:38 +0000 (19:39 +0530)]
avoid making a call to can_pullup function in vbus_session for non-android
gadget drivers. The mass storage gadget driver assumes that the UDCs
start with data pullup connected and the mass storage gadget
driver do not make an explicit call to usb_gadget_connect.

Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Bug 922561
Change-Id: Ifad305db861caf27b1d9c8e541c2480bb1536b6b
Reviewed-on: http://git-master/r/80076
Reviewed-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

drivers/usb/gadget/fsl_udc_core.c

index 28bb188..8d91700 100644 (file)
@@ -1402,6 +1402,10 @@ static int fsl_vbus_session(struct usb_gadget *gadget, int is_active)
                        schedule_delayed_work(&udc->work,
                                USB_CHARGER_DETECTION_WAIT_TIME_MS);
                }
+
+#ifndef CONFIG_USB_G_ANDROID
+               return 0;
+#endif
        }
 
        spin_lock_irqsave(&udc->lock, flags);