summaryrefslogtreecommitdiffstats
path: root/firmware/usb.c
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-09-05 11:37:12 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-09-05 11:37:12 +0000
commitf695681d5011ae5a14261405a6ca71dd770bdcbd (patch)
treef3402d7ed81e62f4391dd0bf9e47e68bfeacd9e3 /firmware/usb.c
parent7d4fed53cc1e8b0e5aa250ebea3a1b53fc3a50b2 (diff)
downloadrockbox-f695681d5011ae5a14261405a6ca71dd770bdcbd.tar.gz
rockbox-f695681d5011ae5a14261405a6ca71dd770bdcbd.tar.bz2
rockbox-f695681d5011ae5a14261405a6ca71dd770bdcbd.zip
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
Diffstat (limited to 'firmware/usb.c')
-rw-r--r--firmware/usb.c4
1 files 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)