Loading drivers/usb/dwc3/gadget.c +2 −2 Original line number Diff line number Diff line Loading @@ -2124,7 +2124,7 @@ static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on) is_on = !!is_on; dwc->softconnect = is_on; if (((dwc->dr_mode == USB_DR_MODE_OTG) && !dwc->vbus_active) if (((dwc->dr_mode > USB_DR_MODE_HOST) && !dwc->vbus_active) || !dwc->gadget_driver) { /* * Need to wait for vbus_session(on) from otg driver or to Loading Loading @@ -2264,7 +2264,7 @@ static int dwc3_gadget_vbus_session(struct usb_gadget *_gadget, int is_active) unsigned long flags; int ret = 0; if (dwc->dr_mode != USB_DR_MODE_OTG) if (dwc->dr_mode <= USB_DR_MODE_HOST) return -EPERM; is_active = !!is_active; Loading Loading
drivers/usb/dwc3/gadget.c +2 −2 Original line number Diff line number Diff line Loading @@ -2124,7 +2124,7 @@ static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on) is_on = !!is_on; dwc->softconnect = is_on; if (((dwc->dr_mode == USB_DR_MODE_OTG) && !dwc->vbus_active) if (((dwc->dr_mode > USB_DR_MODE_HOST) && !dwc->vbus_active) || !dwc->gadget_driver) { /* * Need to wait for vbus_session(on) from otg driver or to Loading Loading @@ -2264,7 +2264,7 @@ static int dwc3_gadget_vbus_session(struct usb_gadget *_gadget, int is_active) unsigned long flags; int ret = 0; if (dwc->dr_mode != USB_DR_MODE_OTG) if (dwc->dr_mode <= USB_DR_MODE_HOST) return -EPERM; is_active = !!is_active; Loading