From f695681d5011ae5a14261405a6ca71dd770bdcbd Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Mon, 5 Sep 2011 11:37:12 +0000 Subject: [PATCH] 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 --- firmware/usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/usb.c b/firmware/usb.c index 8d61f2e60c..298627c4a5 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -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)