diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-10-11 01:04:41 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-10-13 13:41:44 -0400 |
commit | b331872b85c2ab388129af3343474e02e89498af (patch) | |
tree | 2337bac307e1dc6998bb010b00a4fcc7b0015fd2 /drivers/usb/renesas_usbhs/mod_gadget.c | |
parent | 3cf8ed1284799406c506029207004e97d5b2c738 (diff) |
usb: gadget: renesas_usbhs: move done callback to struct usbhs_pkt
transfer done function was registered in struct struct usbhs_pipe_info.
It was good for mod_gadget, but not good for mod_host.
This function move it to struct usbhs_pkt.
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/mod_gadget.c')
-rw-r--r-- | drivers/usb/renesas_usbhs/mod_gadget.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index d5f80c4457e5..563128531e65 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c | |||
@@ -127,24 +127,6 @@ LIST_HEAD(the_controller_link); | |||
127 | /* | 127 | /* |
128 | * queue push/pop | 128 | * queue push/pop |
129 | */ | 129 | */ |
130 | static void usbhsg_queue_push(struct usbhsg_uep *uep, | ||
131 | struct usbhsg_request *ureq) | ||
132 | { | ||
133 | struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); | ||
134 | struct device *dev = usbhsg_gpriv_to_dev(gpriv); | ||
135 | struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); | ||
136 | struct usbhs_pkt *pkt = usbhsg_ureq_to_pkt(ureq); | ||
137 | struct usb_request *req = &ureq->req; | ||
138 | |||
139 | req->actual = 0; | ||
140 | req->status = -EINPROGRESS; | ||
141 | usbhs_pkt_push(pipe, pkt, req->buf, req->length, req->zero); | ||
142 | |||
143 | dev_dbg(dev, "pipe %d : queue push (%d)\n", | ||
144 | usbhs_pipe_number(pipe), | ||
145 | req->length); | ||
146 | } | ||
147 | |||
148 | static void usbhsg_queue_pop(struct usbhsg_uep *uep, | 130 | static void usbhsg_queue_pop(struct usbhsg_uep *uep, |
149 | struct usbhsg_request *ureq, | 131 | struct usbhsg_request *ureq, |
150 | int status) | 132 | int status) |
@@ -170,6 +152,25 @@ static void usbhsg_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt) | |||
170 | usbhsg_queue_pop(uep, ureq, 0); | 152 | usbhsg_queue_pop(uep, ureq, 0); |
171 | } | 153 | } |
172 | 154 | ||
155 | static void usbhsg_queue_push(struct usbhsg_uep *uep, | ||
156 | struct usbhsg_request *ureq) | ||
157 | { | ||
158 | struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); | ||
159 | struct device *dev = usbhsg_gpriv_to_dev(gpriv); | ||
160 | struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); | ||
161 | struct usbhs_pkt *pkt = usbhsg_ureq_to_pkt(ureq); | ||
162 | struct usb_request *req = &ureq->req; | ||
163 | |||
164 | req->actual = 0; | ||
165 | req->status = -EINPROGRESS; | ||
166 | usbhs_pkt_push(pipe, pkt, usbhsg_queue_done, | ||
167 | req->buf, req->length, req->zero); | ||
168 | |||
169 | dev_dbg(dev, "pipe %d : queue push (%d)\n", | ||
170 | usbhs_pipe_number(pipe), | ||
171 | req->length); | ||
172 | } | ||
173 | |||
173 | /* | 174 | /* |
174 | * dma map/unmap | 175 | * dma map/unmap |
175 | */ | 176 | */ |
@@ -664,7 +665,6 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status) | |||
664 | * pipe initialize and enable DCP | 665 | * pipe initialize and enable DCP |
665 | */ | 666 | */ |
666 | usbhs_pipe_init(priv, | 667 | usbhs_pipe_init(priv, |
667 | usbhsg_queue_done, | ||
668 | usbhsg_dma_map_ctrl); | 668 | usbhsg_dma_map_ctrl); |
669 | usbhs_fifo_init(priv); | 669 | usbhs_fifo_init(priv); |
670 | usbhsg_uep_init(gpriv); | 670 | usbhsg_uep_init(gpriv); |