From ab715d8e347fcbbc253ec5cae1c5295043821727 Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Mon, 28 Feb 2022 14:32:09 +0200 Subject: [PATCH] zephyr: spinlock: Fix compile time warnings With Zephyr, spinlock.h needs to know `struct k_spinlock` definition. Include, Zephyr's header. This fixes compile time warnings like this: z/modules/audio/sof/zephyr/../src/include/sof/schedule/ll_schedule_domain.h: In function 'domain_init'" z/modules/audio/sof/zephyr/../src/include/sof/schedule/ll_schedule_domain.h:93:18: warning: passing argument 1 of 'k_spinlock_init' from incompatible pointer type [-Wincompatible-pointer-types] Signed-off-by: Daniel Baluta --- src/include/sof/spinlock.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/include/sof/spinlock.h b/src/include/sof/spinlock.h index 0d68459aa..70521ed64 100644 --- a/src/include/sof/spinlock.h +++ b/src/include/sof/spinlock.h @@ -166,6 +166,8 @@ void _k_spin_unlock_irq(struct k_spinlock *lock, k_spinlock_key_t key, int line) #else +#include + /* This has to be moved to Zephyr */ static inline void k_spinlock_init(struct k_spinlock *lock) {