From: Kuninori Morimoto Date: Fri, 18 Nov 2011 02:19:38 +0000 (-0800) Subject: usb: renesas_usbhs: fixup signal the driver that cable was disconnected X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8885a897c26b2f63e1bbb6fa7bd9da3a73a09113;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git usb: renesas_usbhs: fixup signal the driver that cable was disconnected current renesas_usbhs is using new style udc_start/stop from af1d7056a5c1e5eaaf807ddd1423101db84668d0 (usb: gadget: renesas: convert to new style). cable disconnected signal was needed. This patch fixup it. Signed-off-by: Kuninori Morimoto Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index ef82274ce70b..f4b032ed326a 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c @@ -805,6 +805,13 @@ static int usbhsg_start(struct usbhs_priv *priv) static int usbhsg_stop(struct usbhs_priv *priv) { + struct usbhsg_gpriv *gpriv = usbhsg_priv_to_gpriv(priv); + + /* cable disconnect */ + if (gpriv->driver && + gpriv->driver->disconnect) + gpriv->driver->disconnect(&gpriv->gadget); + return usbhsg_try_stop(priv, USBHSG_STATUS_STARTED); }