1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Frank Gevaerts 2008-03-01 19:28:09 +00:00
parent 3c58f5d026
commit 5daf9b043a

View file

@ -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 * won't be used. This simplifies other logic (i.e. we don't need to know
* yet which drivers will be enabled */ * yet which drivers will be enabled */
#ifdef USB_STORAGE #ifdef USB_STORAGE
usb_storage_init(); if(usb_core_storage_enabled)
usb_storage_init();
#endif #endif
#ifdef USB_SERIAL #ifdef USB_SERIAL
usb_serial_init(); if(usb_core_serial_enabled)
usb_serial_init();
#endif #endif
#ifdef USB_BENCHMARK #ifdef USB_BENCHMARK
usb_benchmark_init(); if(usb_core_benchmark_enabled)
usb_benchmark_init();
#endif #endif
initialized = true; initialized = true;
usb_state = DEFAULT; usb_state = DEFAULT;