diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2008-03-02 00:43:45 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2008-03-02 00:43:45 +0000 |
commit | b879afd600b9ac4e7fa80687321d4f6633aecce0 (patch) | |
tree | a8313a51025f87a4c17ef1d0d7270abbb7c8ce9a /firmware | |
parent | 014568590d72729add3d508f7a1ab6a2ed6468fc (diff) | |
download | rockbox-b879afd600b9ac4e7fa80687321d4f6633aecce0.tar.gz rockbox-b879afd600b9ac4e7fa80687321d4f6633aecce0.zip |
small cleanup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16473 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/usb.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/firmware/usb.c b/firmware/usb.c index 725dd5ed1d..08eacb865b 100644 --- a/firmware/usb.c +++ b/firmware/usb.c | |||
@@ -73,7 +73,9 @@ static struct thread_entry *usb_thread_entry; | |||
73 | static struct event_queue usb_queue; | 73 | static struct event_queue usb_queue; |
74 | static int last_usb_status; | 74 | static int last_usb_status; |
75 | static bool usb_monitor_enabled; | 75 | static bool usb_monitor_enabled; |
76 | static bool exclusive_disk; | 76 | #ifdef HAVE_USBSTACK |
77 | static bool exclusive_ata_access; | ||
78 | #endif | ||
77 | 79 | ||
78 | 80 | ||
79 | #if defined(IPOD_COLOR) || defined(IPOD_4G) \ | 81 | #if defined(IPOD_COLOR) || defined(IPOD_4G) \ |
@@ -243,7 +245,7 @@ static void usb_thread(void) | |||
243 | #endif /* USE_ROCKBOX_USB */ | 245 | #endif /* USE_ROCKBOX_USB */ |
244 | #ifdef HAVE_PRIORITY_SCHEDULING | 246 | #ifdef HAVE_PRIORITY_SCHEDULING |
245 | thread_set_priority(usb_thread_entry,PRIORITY_REALTIME); | 247 | thread_set_priority(usb_thread_entry,PRIORITY_REALTIME); |
246 | exclusive_disk = true; | 248 | exclusive_ata_access = true; |
247 | #endif | 249 | #endif |
248 | 250 | ||
249 | #else | 251 | #else |
@@ -264,7 +266,7 @@ static void usb_thread(void) | |||
264 | case USB_EXTRACTED: | 266 | case USB_EXTRACTED: |
265 | #ifdef HAVE_USBSTACK | 267 | #ifdef HAVE_USBSTACK |
266 | usb_enable(false); | 268 | usb_enable(false); |
267 | exclusive_disk = false; | 269 | exclusive_ata_access = false; |
268 | #ifdef HAVE_PRIORITY_SCHEDULING | 270 | #ifdef HAVE_PRIORITY_SCHEDULING |
269 | thread_set_priority(usb_thread_entry,PRIORITY_SYSTEM); | 271 | thread_set_priority(usb_thread_entry,PRIORITY_SYSTEM); |
270 | #endif | 272 | #endif |
@@ -423,7 +425,7 @@ void usb_acknowledge(long id) | |||
423 | void usb_init(void) | 425 | void usb_init(void) |
424 | { | 426 | { |
425 | usb_state = USB_EXTRACTED; | 427 | usb_state = USB_EXTRACTED; |
426 | exclusive_disk = false; | 428 | exclusive_ata_access = false; |
427 | usb_monitor_enabled = false; | 429 | usb_monitor_enabled = false; |
428 | countdown = -1; | 430 | countdown = -1; |
429 | 431 | ||
@@ -505,14 +507,14 @@ bool usb_inserted(void) | |||
505 | #ifdef HAVE_USBSTACK | 507 | #ifdef HAVE_USBSTACK |
506 | void usb_request_exclusive_ata(void) | 508 | void usb_request_exclusive_ata(void) |
507 | { | 509 | { |
508 | if(!exclusive_disk) { | 510 | if(!exclusive_ata_access) { |
509 | queue_post(&usb_queue, USB_REQUEST_DISK, 0); | 511 | queue_post(&usb_queue, USB_REQUEST_DISK, 0); |
510 | } | 512 | } |
511 | } | 513 | } |
512 | 514 | ||
513 | bool usb_exclusive_ata(void) | 515 | bool usb_exclusive_ata(void) |
514 | { | 516 | { |
515 | return exclusive_disk; | 517 | return exclusive_ata_access; |
516 | } | 518 | } |
517 | #endif | 519 | #endif |
518 | 520 | ||