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:
parent
3c58f5d026
commit
5daf9b043a
1 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue