summaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/pipe.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-06-06 07:18:28 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-07 18:10:08 +0200
commitdad67397f2090b29cd1f169e6a4ac6f3532c6858 (patch)
tree02f3fe42ef7307b5c70a901b59598478897baa1b /drivers/usb/renesas_usbhs/pipe.c
parentusb: renesas_usbhs: modify data transfer method (diff)
downloadlinux-dad67397f2090b29cd1f169e6a4ac6f3532c6858.tar.xz
linux-dad67397f2090b29cd1f169e6a4ac6f3532c6858.zip
usb: renesas_usbhs: modify data transfer interrupt
On current driver, overall data transfer method was implemented in fifo.c, but its interrupt which is member of packet queue control was still in mod_gadget.c. This patch move it into fifo.c. By this patch, the packet/fifo control is independent from mod_gadget. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/renesas_usbhs/pipe.c')
-rw-r--r--drivers/usb/renesas_usbhs/pipe.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c
index 6e77791f07c8..56137d59e3b2 100644
--- a/drivers/usb/renesas_usbhs/pipe.c
+++ b/drivers/usb/renesas_usbhs/pipe.c
@@ -532,13 +532,18 @@ static struct usbhs_pipe *usbhsp_get_pipe(struct usbhs_priv *priv, u32 type)
}
void usbhs_pipe_init(struct usbhs_priv *priv,
- void (*tx_done)(struct usbhs_pkt *pkt),
- void (*rx_done)(struct usbhs_pkt *pkt))
+ void (*done)(struct usbhs_pkt *pkt))
{
struct usbhs_pipe_info *info = usbhs_priv_to_pipeinfo(priv);
+ struct device *dev = usbhs_priv_to_dev(priv);
struct usbhs_pipe *pipe;
int i;
+ if (!done) {
+ dev_err(dev, "no done function\n");
+ return;
+ }
+
/*
* FIXME
*
@@ -565,8 +570,7 @@ void usbhs_pipe_init(struct usbhs_priv *priv,
usbhsp_pipectrl_set(pipe, ACLRM, 0);
}
- info->tx_done = tx_done;
- info->rx_done = rx_done;
+ info->done = done;
}
struct usbhs_pipe *usbhs_pipe_malloc(struct usbhs_priv *priv,