diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-10-11 07:00:59 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-10-13 19:41:36 +0200 |
commit | 0c6ef985ced753b60ecdc091fa49c3f5fa4a4f79 (patch) | |
tree | dac1c56511cb1e9455eec22320114d69d8df3c33 /drivers/usb/renesas_usbhs/fifo.c | |
parent | usb: gadget: renesas_usbhs: each pipe hold maxpacket size (diff) | |
download | linux-0c6ef985ced753b60ecdc091fa49c3f5fa4a4f79.tar.xz linux-0c6ef985ced753b60ecdc091fa49c3f5fa4a4f79.zip |
usb: gadget: renesas_usbhs: struct usbhs_pipe hold handler
packet handler had moved to struct usbhs_pipe from struct usbhsg_uep.
it is preparation of mod_host support
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/fifo.c')
-rw-r--r-- | drivers/usb/renesas_usbhs/fifo.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index 7eacacda8589..328238c373f6 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -54,7 +54,6 @@ static struct usbhs_pkt_handle usbhsf_null_handler = { }; void usbhs_pkt_push(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt, - struct usbhs_pkt_handle *handler, void *buf, int len, int zero) { struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe); @@ -64,17 +63,22 @@ void usbhs_pkt_push(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt, /******************** spin lock ********************/ usbhs_lock(priv, flags); - if (!handler) { + if (!pipe->handler) { dev_err(dev, "no handler function\n"); - handler = &usbhsf_null_handler; + pipe->handler = &usbhsf_null_handler; } list_del_init(&pkt->node); list_add_tail(&pkt->node, &pipe->list); + /* + * each pkt must hold own handler. + * because handler might be changed by its situation. + * dma handler -> pio handler. + */ pkt->pipe = pipe; pkt->buf = buf; - pkt->handler = handler; + pkt->handler = pipe->handler; pkt->length = len; pkt->zero = zero; pkt->actual = 0; |