diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2008-03-01 19:28:09 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2008-03-01 19:28:09 +0000 |
commit | 5daf9b043af1c0cb434dd5202f2f427db4e26f2e (patch) | |
tree | 29e99309d084e4d80cfc4eb906124f1a5c9a5f9b /firmware/usbstack | |
parent | 3c58f5d0269dbbea74d0a225b465792b299bd48d (diff) | |
download | rockbox-5daf9b043af1c0cb434dd5202f2f427db4e26f2e.tar.gz rockbox-5daf9b043af1c0cb434dd5202f2f427db4e26f2e.zip |
only initialize class drivers that are actually enabled. This is needed for usb-storage because it grabs the audio buffer during usb_storage_init(), which stops playback. It's probably also the right thing to do for other drivers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16467 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usbstack')
-rw-r--r-- | firmware/usbstack/usb_core.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/firmware/usbstack/usb_core.c b/firmware/usbstack/usb_core.c index a864ac8b3a..aa0f06e4f6 100644 --- a/firmware/usbstack/usb_core.c +++ b/firmware/usbstack/usb_core.c | |||
@@ -385,15 +385,18 @@ void usb_core_init(void) | |||
385 | * won't be used. This simplifies other logic (i.e. we don't need to know | 385 | * won't be used. This simplifies other logic (i.e. we don't need to know |
386 | * yet which drivers will be enabled */ | 386 | * yet which drivers will be enabled */ |
387 | #ifdef USB_STORAGE | 387 | #ifdef USB_STORAGE |
388 | usb_storage_init(); | 388 | if(usb_core_storage_enabled) |
389 | usb_storage_init(); | ||
389 | #endif | 390 | #endif |
390 | 391 | ||
391 | #ifdef USB_SERIAL | 392 | #ifdef USB_SERIAL |
392 | usb_serial_init(); | 393 | if(usb_core_serial_enabled) |
394 | usb_serial_init(); | ||
393 | #endif | 395 | #endif |
394 | 396 | ||
395 | #ifdef USB_BENCHMARK | 397 | #ifdef USB_BENCHMARK |
396 | usb_benchmark_init(); | 398 | if(usb_core_benchmark_enabled) |
399 | usb_benchmark_init(); | ||
397 | #endif | 400 | #endif |
398 | initialized = true; | 401 | initialized = true; |
399 | usb_state = DEFAULT; | 402 | usb_state = DEFAULT; |