From 2ac596b91adf8d946712e62df96c81730b5b06ce Mon Sep 17 00:00:00 2001 From: Peter Bigot Date: Wed, 31 Mar 2021 10:31:30 -0500 Subject: [PATCH] usb: conversion of k_work API Replace all existing deprecated API with the recommended alternative. Be aware that this does not address architectural errors in the use of the work API. Fixes #34092 Signed-off-by: Peter Bigot Signed-off-by: Johann Fischer --- drivers/usb/device/usb_dc_nrfx.c | 8 ++++---- subsys/usb/usb_work_q.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/usb/device/usb_dc_nrfx.c b/drivers/usb/device/usb_dc_nrfx.c index eb6c6c9c7db..a49c454dd4e 100644 --- a/drivers/usb/device/usb_dc_nrfx.c +++ b/drivers/usb/device/usb_dc_nrfx.c @@ -1915,10 +1915,10 @@ static int usb_init(const struct device *arg) (void)nrfx_power_init(&power_config); nrfx_power_usbevt_init(&usbevt_config); - k_work_q_start(&usbd_work_queue, - usbd_work_queue_stack, - K_KERNEL_STACK_SIZEOF(usbd_work_queue_stack), - CONFIG_SYSTEM_WORKQUEUE_PRIORITY); + k_work_queue_start(&usbd_work_queue, + usbd_work_queue_stack, + K_KERNEL_STACK_SIZEOF(usbd_work_queue_stack), + CONFIG_SYSTEM_WORKQUEUE_PRIORITY, NULL); k_work_init(&ctx->usb_work, usbd_work_handler); diff --git a/subsys/usb/usb_work_q.c b/subsys/usb/usb_work_q.c index 6b22b8d9b0c..7ff7d063d47 100644 --- a/subsys/usb/usb_work_q.c +++ b/subsys/usb/usb_work_q.c @@ -18,10 +18,10 @@ static int z_usb_work_q_init(const struct device *dev) { ARG_UNUSED(dev); - k_work_q_start(&z_usb_work_q, - z_usb_work_q_stack, - K_KERNEL_STACK_SIZEOF(z_usb_work_q_stack), - CONFIG_USB_WORKQUEUE_PRIORITY); + k_work_queue_start(&z_usb_work_q, + z_usb_work_q_stack, + K_KERNEL_STACK_SIZEOF(z_usb_work_q_stack), + CONFIG_USB_WORKQUEUE_PRIORITY, NULL); k_thread_name_set(&z_usb_work_q.thread, "usbworkq"); return 0;