Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1189f7f6 authored by Felipe Balbi's avatar Felipe Balbi
Browse files

usb: musb: 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 avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 8e74475b
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -2083,9 +2083,12 @@ __acquires(musb->lock)
				: NULL
			);

	/* report disconnect, if we didn't already (flushing EP state) */
	if (musb->g.speed != USB_SPEED_UNKNOWN)
		musb_g_disconnect(musb);
	/* report reset, if we didn't already (flushing EP state) */
	if (musb->gadget_driver && musb->g.speed != USB_SPEED_UNKNOWN) {
		spin_unlock(&musb->lock);
		usb_gadget_udc_reset(&musb->g, musb->gadget_driver);
		spin_lock(&musb->lock);
	}

	/* clear HR */
	else if (devctl & MUSB_DEVCTL_HR)