zephyr: spinlock: Fix compile time warnings

With Zephyr, spinlock.h needs to know `struct k_spinlock`
definition.

Include, Zephyr's <kernel.h> 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 <daniel.baluta@nxp.com>
This commit is contained in:
Daniel Baluta 2022-02-28 14:32:09 +02:00 committed by Liam Girdwood
parent 57e0e149aa
commit ab715d8e34
1 changed files with 2 additions and 0 deletions

View File

@ -166,6 +166,8 @@ void _k_spin_unlock_irq(struct k_spinlock *lock, k_spinlock_key_t key, int line)
#else
#include <kernel.h>
/* This has to be moved to Zephyr */
static inline void k_spinlock_init(struct k_spinlock *lock)
{