summaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_fifo.c
diff options
context:
space:
mode:
authorChristoph Muellner <cmuellner@linux.com>2021-04-06 04:53:53 +0300
committerAnup Patel <anup@brainfault.org>2021-04-09 16:09:50 +0300
commitd0e406fa44a108210d29b26281777206961cd772 (patch)
tree9e67e54afd10612d2e157fa2e5143e4f8008f2ec /lib/sbi/sbi_fifo.c
parentd4a94ea471451f0a24e02e2e7ebf869bb4f7dbf4 (diff)
downloadopensbi-d0e406fa44a108210d29b26281777206961cd772.tar.xz
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>
Diffstat (limited to 'lib/sbi/sbi_fifo.c')
-rw-r--r--lib/sbi/sbi_fifo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi/sbi_fifo.c b/lib/sbi/sbi_fifo.c
index 8d1dbf0..2a5c012 100644
--- a/lib/sbi/sbi_fifo.c
+++ b/lib/sbi/sbi_fifo.c
@@ -18,7 +18,7 @@ void sbi_fifo_init(struct sbi_fifo *fifo, void *queue_mem, u16 entries,
fifo->queue = queue_mem;
fifo->num_entries = entries;
fifo->entry_size = entry_size;
- SPIN_LOCK_INIT(&fifo->qlock);
+ SPIN_LOCK_INIT(fifo->qlock);
fifo->avail = fifo->tail = 0;
sbi_memset(fifo->queue, 0, (size_t)entries * entry_size);
}