Skip to content
Commit e4480d6a authored by Marcin Niestroj's avatar Marcin Niestroj Committed by Fabio Baltieri
Browse files

drivers: usb_dc_mcux: create thread and connect IRQ during init



So far thread was created as part of usb_dc_attach() by k_thread_create().
This means that if following function were executed:

 * usb_enable()
 * usb_disable()
 * usb_enable()

then k_thread_create() was called second time. This results in undefined
behavior.

Fix above issue by moving k_thread_create() invocation to function called
during system initialization.

While at it, move IRQ_CONNECT() and irq_enable() invocations to init as
well.

Signed-off-by: default avatarMarcin Niestroj <m.niestroj@emb.dev>
parent 9de245a5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment