aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-12-11 01:43:45 -0500
committerFelipe Balbi <balbi@ti.com>2012-12-13 04:58:39 -0500
commit584829459bd4421f0f57d11a6ceeef096ec81d08 (patch)
treee6fffe902000c37f200c22f1038cff96b4e1c29c /drivers/usb/renesas_usbhs
parent1604c1e760119ab3fe9f71679ebaeb058d3d8ae1 (diff)
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: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r--drivers/usb/renesas_usbhs/mod_gadget.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index dd41f61893ef..c6942d7fec47 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -545,15 +545,6 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
545 return 0; 545 return 0;
546} 546}
547 547
548static void usbhsg_uep_init(struct usbhsg_gpriv *gpriv)
549{
550 int i;
551 struct usbhsg_uep *uep;
552
553 usbhsg_for_each_uep_with_dcp(uep, gpriv, i)
554 uep->pipe = NULL;
555}
556
557/* 548/*
558 * 549 *
559 * usb_ep_ops 550 * usb_ep_ops
@@ -761,7 +752,6 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status)
761 usbhs_pipe_init(priv, 752 usbhs_pipe_init(priv,
762 usbhsg_dma_map_ctrl); 753 usbhsg_dma_map_ctrl);
763 usbhs_fifo_init(priv); 754 usbhs_fifo_init(priv);
764 usbhsg_uep_init(gpriv);
765 755
766 /* dcp init */ 756 /* dcp init */
767 dcp->pipe = usbhs_dcp_malloc(priv); 757 dcp->pipe = usbhs_dcp_malloc(priv);
@@ -998,6 +988,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
998 */ 988 */
999 usbhsg_for_each_uep_with_dcp(uep, gpriv, i) { 989 usbhsg_for_each_uep_with_dcp(uep, gpriv, i) {
1000 uep->gpriv = gpriv; 990 uep->gpriv = gpriv;
991 uep->pipe = NULL;
1001 snprintf(uep->ep_name, EP_NAME_SIZE, "ep%d", i); 992 snprintf(uep->ep_name, EP_NAME_SIZE, "ep%d", i);
1002 993
1003 uep->ep.name = uep->ep_name; 994 uep->ep.name = uep->ep_name;