From 12375d1d3aa41f7d277a9af584c7b810b636ec95 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 2 Mar 2011 08:49:38 +0000 Subject: Merge functionality of wakeups and semaphores-- fewer APIs and object types. semaphore_wait takes a timeout now so codecs and plugins have to be made incompatible. Don't make semaphores for targets not using them. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29492 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/mips/ingenic_jz47xx/usb-jz4740.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'firmware/target/mips/ingenic_jz47xx/usb-jz4740.c') diff --git a/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c b/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c index f12f1bed82..a615d3d4da 100644 --- a/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c @@ -69,7 +69,7 @@ struct usb_endpoint unsigned short fifo_size; bool wait; - struct wakeup wakeup; + struct semaphore complete; }; static unsigned char ep0_rx_buf[64]; @@ -171,7 +171,7 @@ static inline void ep_transfer_completed(struct usb_endpoint* ep) ep->buf = NULL; ep->busy = false; if(ep->wait) - wakeup_signal(&ep->wakeup); + semaphore_release(&ep->complete); } static void EP0_send(void) @@ -598,7 +598,7 @@ void usb_init_device(void) system_enable_irq(IRQ_UDC); for(i=0; iwakeup, TIMEOUT_BLOCK); + semaphore_wait(&ep->complete, TIMEOUT_BLOCK); ep->wait = false; } } -- cgit v1.2.3