blob: 92bb058585412e914e81640b86f708dabc126049 [file] [log] [blame]
From a9e8131d2d9acdd20e597ac769fdedce04db4db9 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Mon, 10 Dec 2012 22:43:45 -0800
Subject: usb: renesas_usbhs: gadget: remove usbhsg_uep_init()
Current driver always initialized uep->pipe to NULL on usbhsg_try_start().
But it breaks relationship with
usb_ep_ops :: enable/disable functions when suspend/resume.
This patch solved this issue by initializing uep->pipe on probe()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
drivers/usb/renesas_usbhs/mod_gadget.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -541,15 +541,6 @@ static int usbhsg_pipe_disable(struct us
return 0;
}
-static void usbhsg_uep_init(struct usbhsg_gpriv *gpriv)
-{
- int i;
- struct usbhsg_uep *uep;
-
- usbhsg_for_each_uep_with_dcp(uep, gpriv, i)
- uep->pipe = NULL;
-}
-
/*
*
* usb_ep_ops
@@ -760,7 +751,6 @@ static int usbhsg_try_start(struct usbhs
usbhs_pipe_init(priv,
usbhsg_dma_map_ctrl);
usbhs_fifo_init(priv);
- usbhsg_uep_init(gpriv);
/* dcp init */
dcp->pipe = usbhs_dcp_malloc(priv);
@@ -973,6 +963,7 @@ int usbhs_mod_gadget_probe(struct usbhs_
*/
usbhsg_for_each_uep_with_dcp(uep, gpriv, i) {
uep->gpriv = gpriv;
+ uep->pipe = NULL;
snprintf(uep->ep_name, EP_NAME_SIZE, "ep%d", i);
uep->ep.name = uep->ep_name;