Commit afbe4775 authored by Peter Chen's avatar Peter Chen Committed by Felipe Balbi

usb: chipidea: gadget: use udc-core's reset notifier

Replace usb_gadget_driver's disconnect with udc-core's reset notifier at
bus reset handler.
Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 5ca1ccda
...@@ -692,10 +692,8 @@ __acquires(ci->lock) ...@@ -692,10 +692,8 @@ __acquires(ci->lock)
int retval; int retval;
spin_unlock(&ci->lock); spin_unlock(&ci->lock);
if (ci->gadget.speed != USB_SPEED_UNKNOWN) { if (ci->gadget.speed != USB_SPEED_UNKNOWN)
if (ci->driver) usb_gadget_udc_reset(&ci->gadget, ci->driver);
ci->driver->disconnect(&ci->gadget);
}
retval = _gadget_stop_activity(&ci->gadget); retval = _gadget_stop_activity(&ci->gadget);
if (retval) if (retval)
...@@ -709,8 +707,6 @@ __acquires(ci->lock) ...@@ -709,8 +707,6 @@ __acquires(ci->lock)
if (ci->status == NULL) if (ci->status == NULL)
retval = -ENOMEM; retval = -ENOMEM;
usb_gadget_set_state(&ci->gadget, USB_STATE_DEFAULT);
done: done:
spin_lock(&ci->lock); spin_lock(&ci->lock);
......
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