From d572b06a6ca9d2e12222691e09f7795a0d8930d0 Mon Sep 17 00:00:00 2001 From: Tobias Johansson Date: Thu, 5 Nov 2020 10:15:34 +0100 Subject: [PATCH] drivers:audio: cxd56: move helpers to the header file The Queue helpers should be moved to the header file Signed-off-by: Alin Jerpelea --- drivers/audio/cxd56.c | 12 +----------- drivers/audio/cxd56.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/audio/cxd56.c b/drivers/audio/cxd56.c index 15f7d67672..9f01ccdc6c 100644 --- a/drivers/audio/cxd56.c +++ b/drivers/audio/cxd56.c @@ -170,17 +170,6 @@ #define CXD56_DMA_CMD_FIFO_NOT_FULL 1 #define CXD56_DMA_START_ADDR_MASK 0x3fffffff -/* Queue helpers */ - -#define dq_put(q,n) (dq_addlast((dq_entry_t*)n,(q))) -#define dq_get(q) (dq_remfirst(q)) -#define dq_clear(q) \ - do \ - { \ - dq_remlast(q); \ - } \ - while (!dq_empty(q)) - /**************************************************************************** * Public Function Prototypes ****************************************************************************/ @@ -1360,6 +1349,7 @@ static void cxd56_dma_int_handler(void) else { audinfo("Unhandled interrupt\n"); + return; } diff --git a/drivers/audio/cxd56.h b/drivers/audio/cxd56.h index 685ed562bc..ccf45a7090 100644 --- a/drivers/audio/cxd56.h +++ b/drivers/audio/cxd56.h @@ -227,6 +227,18 @@ # define CONFIG_CXD56_AUDIO_NUM_BUFFERS 4 #endif +/* Queue helpers */ + +#define dq_get(q) (dq_remfirst(q)) +#define dq_put(q,n) (dq_addlast((dq_entry_t*)n,(q))) +#define dq_put_back(q,n) (dq_addfirst((dq_entry_t*)n,(q))) +#define dq_clear(q) \ + do \ + { \ + dq_remlast(q); \ + } \ + while (!dq_empty(q)) + /**************************************************************************** * Public Types ****************************************************************************/