drivers:audio: cxd56: move helpers to the header file

The Queue helpers should be moved to the header file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Tobias Johansson 2020-11-05 10:15:34 +01:00 committed by Masayuki Ishikawa
parent 9c19db6e14
commit d572b06a6c
2 changed files with 13 additions and 11 deletions

View File

@ -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;
}

View File

@ -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
****************************************************************************/