提交 58482945 编写于 作者: K Kuninori Morimoto 提交者: Felipe Balbi

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: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 1604c1e7
...@@ -545,15 +545,6 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep) ...@@ -545,15 +545,6 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
return 0; 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 * usb_ep_ops
...@@ -761,7 +752,6 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status) ...@@ -761,7 +752,6 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status)
usbhs_pipe_init(priv, usbhs_pipe_init(priv,
usbhsg_dma_map_ctrl); usbhsg_dma_map_ctrl);
usbhs_fifo_init(priv); usbhs_fifo_init(priv);
usbhsg_uep_init(gpriv);
/* dcp init */ /* dcp init */
dcp->pipe = usbhs_dcp_malloc(priv); dcp->pipe = usbhs_dcp_malloc(priv);
...@@ -998,6 +988,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv) ...@@ -998,6 +988,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
*/ */
usbhsg_for_each_uep_with_dcp(uep, gpriv, i) { usbhsg_for_each_uep_with_dcp(uep, gpriv, i) {
uep->gpriv = gpriv; uep->gpriv = gpriv;
uep->pipe = NULL;
snprintf(uep->ep_name, EP_NAME_SIZE, "ep%d", i); snprintf(uep->ep_name, EP_NAME_SIZE, "ep%d", i);
uep->ep.name = uep->ep_name; uep->ep.name = uep->ep_name;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册