usb: make sure device init happens *after* queue/thread creation

Albeit unlikely, usb_init_devide() could cause de transfer completion before queue creation and the core would push onto a uninitialized queue !

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30433 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Amaury Pouly 2011-09-05 11:37:12 +00:00
parent 7d4fed53cc
commit f695681d50

View file

@ -675,8 +675,6 @@ void usb_acknowledge(long id)
void usb_init(void)
{
usb_init_device();
#ifdef USB_FULL_INIT
usb_enable(false);
@ -690,6 +688,8 @@ void usb_init(void)
tick_add_task(usb_tick);
#endif
#endif /* USB_FULL_INIT */
usb_init_device();
}
void usb_wait_for_disconnect(struct event_queue *q)