diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2011-12-13 08:12:19 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2011-12-13 08:12:19 +0000 |
commit | e4bee2b1091ead920b7ef0e5d21d3c929e219dca (patch) | |
tree | cbf9513895622a6e77142d8e6e164d444cac76fd /firmware/target/arm/as3525/usb-drv-as3525v2.c | |
parent | 1afe28072a73f480e9595b2bf04aa8c16ca6aebe (diff) |
usb-s3c6400 : simplify
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31229 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/usb-drv-as3525v2.c')
-rw-r--r-- | firmware/target/arm/as3525/usb-drv-as3525v2.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/usb-drv-as3525v2.c b/firmware/target/arm/as3525/usb-drv-as3525v2.c index e9d2d36fa4..cfa9d390bf 100644 --- a/firmware/target/arm/as3525/usb-drv-as3525v2.c +++ b/firmware/target/arm/as3525/usb-drv-as3525v2.c @@ -792,11 +792,7 @@ static void usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool block DEPCTL(ep, !dir_in) |= DEPCTL_epena | DEPCTL_cnak; - /* restore interrupts */ restore_irq(oldlevel); - - if(blocking) - semaphore_wait(&endpoint->complete, TIMEOUT_BLOCK); } int usb_drv_recv(int ep, void *ptr, int len) @@ -808,7 +804,9 @@ int usb_drv_recv(int ep, void *ptr, int len) int usb_drv_send(int ep, void *ptr, int len) { usb_drv_transfer(ep, ptr, len, true, true); - return endpoints[EP_NUM(ep)][1].status; + struct usb_endpoint *endpoint = &endpoints[ep][1]; + semaphore_wait(&endpoint->complete, TIMEOUT_BLOCK); + return endpoints->status; } int usb_drv_send_nonblocking(int ep, void *ptr, int len) |