Skip to content

Commit

Permalink
usb: renesas_usbhs: gadget: remove usbhsg_uep_init()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kuninori Morimoto authored and Felipe Balbi committed Dec 13, 2012
1 parent 1604c1e commit 5848294
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions drivers/usb/renesas_usbhs/mod_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,15 +545,6 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
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
Expand Down Expand Up @@ -761,7 +752,6 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status)
usbhs_pipe_init(priv,
usbhsg_dma_map_ctrl);
usbhs_fifo_init(priv);
usbhsg_uep_init(gpriv);

/* dcp init */
dcp->pipe = usbhs_dcp_malloc(priv);
Expand Down Expand Up @@ -998,6 +988,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
*/
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;
Expand Down

0 comments on commit 5848294

Please sign in to comment.