Skip to content

Commit 3dd8cdb

Browse files
lyakhkv2019i
authored andcommitted
dma: only include sof_dma.h when needed
sof_dma.h is only used when actually building SOF. Put it under a proprocessor conditional to fix including the header in twister builds. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 193404a commit 3dd8cdb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • zephyr/include/sof/lib

zephyr/include/sof/lib/dma.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ int dmac_init(struct sof *sof);
270270
* Need to use sof_dma.h to avoid "syscalls/dma.h" name conflict
271271
* with Zephyr autogenerated headers for syscall support.
272272
*/
273+
#ifdef CONFIG_ZEPHYR_NATIVE_DRIVERS
273274
#include "sof_dma.h"
274-
275-
#ifndef CONFIG_ZEPHYR_NATIVE_DRIVERS
275+
#else
276276
#include "dma-legacy.h"
277277
#endif /* !CONFIG_ZEPHYR_NATIVE_DRIVERS */
278278

0 commit comments

Comments
 (0)