Commit 69e28882 authored by Felipe Balbi's avatar Felipe Balbi

usb: musb: gadget: do not rely on 'driver' argument

future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 82891b95
...@@ -1946,11 +1946,11 @@ static int musb_gadget_stop(struct usb_gadget *g, ...@@ -1946,11 +1946,11 @@ static int musb_gadget_stop(struct usb_gadget *g,
(void) musb_gadget_vbus_draw(&musb->g, 0); (void) musb_gadget_vbus_draw(&musb->g, 0);
musb->xceiv->state = OTG_STATE_UNDEFINED; musb->xceiv->state = OTG_STATE_UNDEFINED;
stop_activity(musb, driver); stop_activity(musb, NULL);
otg_set_peripheral(musb->xceiv->otg, NULL); otg_set_peripheral(musb->xceiv->otg, NULL);
dev_dbg(musb->controller, "unregistering driver %s\n", dev_dbg(musb->controller, "unregistering driver %s\n",
driver ? driver->function : "(removed)"); musb->gadget_driver->function);
musb->is_active = 0; musb->is_active = 0;
musb->gadget_driver = NULL; musb->gadget_driver = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment