diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-10-11 01:03:39 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-10-13 13:41:41 -0400 |
commit | 2cc971978c0cabcd7760f4431270088cda72d8df (patch) | |
tree | eb24d4e1c745e465c1fd67a54d5f55ab7bc7d009 | |
parent | 923520715b5a698271f8763e97eee65e21d5561e (diff) |
usb: gadget: renesas_usbhs: add struct usbhs_priv to packet done function
There was no method to get struct usbhs_priv when
packet transfer done function was called.
This patch allow that callback function receive it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/renesas_usbhs/fifo.c | 2 | ||||
-rw-r--r-- | drivers/usb/renesas_usbhs/mod_gadget.c | 2 | ||||
-rw-r--r-- | drivers/usb/renesas_usbhs/pipe.c | 3 | ||||
-rw-r--r-- | drivers/usb/renesas_usbhs/pipe.h | 5 |
4 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index b9ab8aefcae0..9bf3a437ea0b 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c | |||
@@ -171,7 +171,7 @@ __usbhs_pkt_handler_end: | |||
171 | /******************** spin unlock ******************/ | 171 | /******************** spin unlock ******************/ |
172 | 172 | ||
173 | if (is_done) { | 173 | if (is_done) { |
174 | info->done(pkt); | 174 | info->done(priv, pkt); |
175 | usbhs_pkt_start(pipe); | 175 | usbhs_pkt_start(pipe); |
176 | } | 176 | } |
177 | 177 | ||
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index ae7d816c23d9..dd4ca37fbab3 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c | |||
@@ -159,7 +159,7 @@ static void usbhsg_queue_pop(struct usbhsg_uep *uep, | |||
159 | ureq->req.complete(&uep->ep, &ureq->req); | 159 | ureq->req.complete(&uep->ep, &ureq->req); |
160 | } | 160 | } |
161 | 161 | ||
162 | static void usbhsg_queue_done(struct usbhs_pkt *pkt) | 162 | static void usbhsg_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt) |
163 | { | 163 | { |
164 | struct usbhs_pipe *pipe = pkt->pipe; | 164 | struct usbhs_pipe *pipe = pkt->pipe; |
165 | struct usbhsg_uep *uep = usbhsg_pipe_to_uep(pipe); | 165 | struct usbhsg_uep *uep = usbhsg_pipe_to_uep(pipe); |
diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c index 5238287dc2cb..08d11b0cab43 100644 --- a/drivers/usb/renesas_usbhs/pipe.c +++ b/drivers/usb/renesas_usbhs/pipe.c | |||
@@ -497,7 +497,8 @@ static struct usbhs_pipe *usbhsp_get_pipe(struct usbhs_priv *priv, u32 type) | |||
497 | } | 497 | } |
498 | 498 | ||
499 | void usbhs_pipe_init(struct usbhs_priv *priv, | 499 | void usbhs_pipe_init(struct usbhs_priv *priv, |
500 | void (*done)(struct usbhs_pkt *pkt), | 500 | void (*done)(struct usbhs_priv *priv, |
501 | struct usbhs_pkt *pkt), | ||
501 | int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map)) | 502 | int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map)) |
502 | { | 503 | { |
503 | struct usbhs_pipe_info *info = usbhs_priv_to_pipeinfo(priv); | 504 | struct usbhs_pipe_info *info = usbhs_priv_to_pipeinfo(priv); |
diff --git a/drivers/usb/renesas_usbhs/pipe.h b/drivers/usb/renesas_usbhs/pipe.h index 6073a5c77740..05b706a09e56 100644 --- a/drivers/usb/renesas_usbhs/pipe.h +++ b/drivers/usb/renesas_usbhs/pipe.h | |||
@@ -47,7 +47,7 @@ struct usbhs_pipe_info { | |||
47 | int size; /* array size of "pipe" */ | 47 | int size; /* array size of "pipe" */ |
48 | int bufnmb_last; /* FIXME : driver needs good allocator */ | 48 | int bufnmb_last; /* FIXME : driver needs good allocator */ |
49 | 49 | ||
50 | void (*done)(struct usbhs_pkt *pkt); | 50 | void (*done)(struct usbhs_priv *priv, struct usbhs_pkt *pkt); |
51 | int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map); | 51 | int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map); |
52 | }; | 52 | }; |
53 | 53 | ||
@@ -80,7 +80,8 @@ void usbhs_pipe_remove(struct usbhs_priv *priv); | |||
80 | int usbhs_pipe_is_dir_in(struct usbhs_pipe *pipe); | 80 | int usbhs_pipe_is_dir_in(struct usbhs_pipe *pipe); |
81 | int usbhs_pipe_is_dir_host(struct usbhs_pipe *pipe); | 81 | int usbhs_pipe_is_dir_host(struct usbhs_pipe *pipe); |
82 | void usbhs_pipe_init(struct usbhs_priv *priv, | 82 | void usbhs_pipe_init(struct usbhs_priv *priv, |
83 | void (*done)(struct usbhs_pkt *pkt), | 83 | void (*done)(struct usbhs_priv *priv, |
84 | struct usbhs_pkt *pkt), | ||
84 | int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map)); | 85 | int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map)); |
85 | int usbhs_pipe_get_maxpacket(struct usbhs_pipe *pipe); | 86 | int usbhs_pipe_get_maxpacket(struct usbhs_pipe *pipe); |
86 | void usbhs_pipe_clear_sequence(struct usbhs_pipe *pipe); | 87 | void usbhs_pipe_clear_sequence(struct usbhs_pipe *pipe); |