kernel: workq: Fix type errors in delayable work handlers
A common pattern here was to take the work item as the subfield of a containing object. But the contained field is not a k_work, it's a k_work_delayable. Things were working only because the work field was first, so the pointers had the same value. Do things right and fix things to produce correct code if/when that field ever moves within delayable. Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This commit is contained in:
parent
6964f2b130
commit
731241f8d0
27 changed files with 72 additions and 36 deletions
|
@ -1354,7 +1354,8 @@ static int uart_stm32_async_tx_abort(const struct device *dev)
|
|||
|
||||
static void uart_stm32_async_rx_timeout(struct k_work *work)
|
||||
{
|
||||
struct uart_dma_stream *rx_stream = CONTAINER_OF(work,
|
||||
struct k_work_delayable *dwork = k_work_delayable_from_work(work);
|
||||
struct uart_dma_stream *rx_stream = CONTAINER_OF(dwork,
|
||||
struct uart_dma_stream, timeout_work);
|
||||
struct uart_stm32_data *data = CONTAINER_OF(rx_stream,
|
||||
struct uart_stm32_data, dma_rx);
|
||||
|
@ -1371,7 +1372,8 @@ static void uart_stm32_async_rx_timeout(struct k_work *work)
|
|||
|
||||
static void uart_stm32_async_tx_timeout(struct k_work *work)
|
||||
{
|
||||
struct uart_dma_stream *tx_stream = CONTAINER_OF(work,
|
||||
struct k_work_delayable *dwork = k_work_delayable_from_work(work);
|
||||
struct uart_dma_stream *tx_stream = CONTAINER_OF(dwork,
|
||||
struct uart_dma_stream, timeout_work);
|
||||
struct uart_stm32_data *data = CONTAINER_OF(tx_stream,
|
||||
struct uart_stm32_data, dma_tx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue