mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
usb: fix hang when disconnecting from USB
regression introduced in 33d0a3efa3
Change-Id: I0ded61d70a09b27820e65979381d2c38410d2923
This commit is contained in:
parent
c23e1ba09a
commit
2556cfc7b3
1 changed files with 5 additions and 2 deletions
|
|
@ -877,6 +877,7 @@ void usb_request_exclusive_storage(void)
|
|||
|
||||
void usb_release_exclusive_storage(void)
|
||||
{
|
||||
int bccount;
|
||||
if(!exclusive_storage_requested) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -887,10 +888,12 @@ void usb_release_exclusive_storage(void)
|
|||
}
|
||||
exclusive_storage_enabled = false;
|
||||
|
||||
#ifdef DEBUG
|
||||
/* Tell all threads that we are back in business */
|
||||
int bccount = queue_broadcast(SYS_USB_DISCONNECTED, 0) - 1;
|
||||
bccount = queue_broadcast(SYS_USB_DISCONNECTED, 0) - 1;
|
||||
#ifdef DEBUG
|
||||
DEBUGF("USB extracted. Broadcast to %d threads...\n", bccount);
|
||||
#else
|
||||
(void)bccount;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue