@@ -1195,7 +1195,7 @@ static int fsl_wakeup(struct usb_gadget *gadget)
static int can_pullup(struct fsl_udc *udc)
{
- return udc->driver && udc->softconnect && udc->vbus_active;
+ return udc->driver && udc->softconnect && udc->gadget.vbus_active;
}
/* Notify controller that VBUS is powered, Called by whatever
@@ -1208,7 +1208,7 @@ static int fsl_vbus_session(struct usb_gadget *gadget, int is_active)
udc = container_of(gadget, struct fsl_udc, gadget);
spin_lock_irqsave(&udc->lock, flags);
VDBG("VBUS %s", is_active ? "on" : "off");
- udc->vbus_active = (is_active != 0);
+ udc->gadget.vbus_active = (is_active != 0);
if (can_pullup(udc))
fsl_writel((fsl_readl(&dr_regs->usbcmd) | USB_CMD_RUN_STOP),
&dr_regs->usbcmd);
@@ -483,7 +483,6 @@ struct fsl_udc {
spinlock_t lock;
struct usb_phy *transceiver;
unsigned softconnect:1;
- unsigned vbus_active:1;
unsigned stopped:1;
unsigned remote_wakeup:1;
unsigned already_stopped:1;
Using common vbus_active to indicate vbus status CC: Li Yang <leoli@freescale.com> Signed-off-by: Peter Chen <peter.chen@freescale.com> --- drivers/usb/gadget/fsl_udc_core.c | 4 ++-- drivers/usb/gadget/fsl_usb2_udc.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-)