include: sbi: Allow direct initialization via SPIN_LOCK_INIT()
authorChristoph Muellner <cmuellner@linux.com>
Tue, 6 Apr 2021 01:53:53 +0000 (03:53 +0200)
committerAnup Patel <anup@brainfault.org>
Fri, 9 Apr 2021 13:09:50 +0000 (18:39 +0530)
commitd0e406fa44a108210d29b26281777206961cd772
tree9e67e54afd10612d2e157fa2e5143e4f8008f2ec
parentd4a94ea471451f0a24e02e2e7ebf869bb4f7dbf4
include: sbi: Allow direct initialization via SPIN_LOCK_INIT()

The current implementation of SPIN_LOCK_INIT() provides the spinlock
to be initialized as reference. This does not allow a direct
initialization of the spinlock object at the creation site.

Let's pass the spinlock directly instead (like Linux does as well)
and adjust all users of the macro (in fact there is only one user).

Signed-off-by: Christoph Muellner <cmuellner@linux.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
include/sbi/riscv_locks.h
lib/sbi/sbi_fifo.c