usb: device_next: remove initialized state checks in event processing
For the simple events, do not check whether the device driver and stack are marked as initialized. USB device notification will reschedule delivery if the stack is not yet marked initialized. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
693191467d
commit
48f2a4bc1a
2 changed files with 1 additions and 6 deletions
|
@ -175,10 +175,6 @@ int udc_submit_event(const struct device *dev,
|
|||
.dev = dev,
|
||||
};
|
||||
|
||||
if (!udc_is_initialized(dev)) {
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
return data->event_cb(dev, &drv_evt);
|
||||
}
|
||||
|
||||
|
|
|
@ -193,8 +193,7 @@ static void usbd_thread(void *p1, void *p2, void *p3)
|
|||
k_msgq_get(&usbd_msgq, &event, K_FOREVER);
|
||||
|
||||
STRUCT_SECTION_FOREACH(usbd_contex, uds_ctx) {
|
||||
if (uds_ctx->dev == event.dev &&
|
||||
usbd_is_initialized(uds_ctx)) {
|
||||
if (uds_ctx->dev == event.dev) {
|
||||
usbd_event_handler(uds_ctx, &event);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue