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>
diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c
index 6e77791..56137d5 100644
--- a/drivers/usb/renesas_usbhs/pipe.c
+++ b/drivers/usb/renesas_usbhs/pipe.c
@@ -532,13 +532,18 @@
}
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 @@
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,