summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-03-01 19:28:09 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-03-01 19:28:09 +0000
commit5daf9b043af1c0cb434dd5202f2f427db4e26f2e (patch)
tree29e99309d084e4d80cfc4eb906124f1a5c9a5f9b /firmware
parent3c58f5d0269dbbea74d0a225b465792b299bd48d (diff)
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')
-rw-r--r--firmware/usbstack/usb_core.c9
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)
* won't be used. This simplifies other logic (i.e. we don't need to know
* yet which drivers will be enabled */
#ifdef USB_STORAGE
- usb_storage_init();
+ if(usb_core_storage_enabled)
+ usb_storage_init();
#endif
#ifdef USB_SERIAL
- usb_serial_init();
+ if(usb_core_serial_enabled)
+ usb_serial_init();
#endif
#ifdef USB_BENCHMARK
- usb_benchmark_init();
+ if(usb_core_benchmark_enabled)
+ usb_benchmark_init();
#endif
initialized = true;
usb_state = DEFAULT;