[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190704153803.12739-5-bigeasy@linutronix.de>
Date: Thu, 4 Jul 2019 17:38:00 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: linux-kernel@...r.kernel.org
Cc: tglx@...utronix.de, Peter Zijlstra <peterz@...radead.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Christian Gromm <christian.gromm@...rochip.com>,
devel@...verdev.osuosl.org
Subject: [PATCH 4/7] staging: most: Use spinlock_t instead of struct spinlock
For spinlocks the type spinlock_t should be used instead of "struct
spinlock".
Use spinlock_t for spinlock's definition.
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Christian Gromm <christian.gromm@...rochip.com>
Cc: devel@...verdev.osuosl.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
---
drivers/staging/most/net/net.c | 3 +--
drivers/staging/most/video/video.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/most/net/net.c b/drivers/staging/most/net/net.c
index c8a64e2090273..09b604df45e63 100644
--- a/drivers/staging/most/net/net.c
+++ b/drivers/staging/most/net/net.c
@@ -69,7 +69,7 @@ struct net_dev_context {
static struct list_head net_devices = LIST_HEAD_INIT(net_devices);
static struct mutex probe_disc_mt; /* ch->linked = true, most_nd_open */
-static struct spinlock list_lock; /* list_head, ch->linked = false, dev_hold */
+static DEFINE_SPINLOCK(list_lock); /* list_head, ch->linked = false, dev_hold */
static struct core_component comp;
static int skb_to_mamac(const struct sk_buff *skb, struct mbo *mbo)
@@ -507,7 +507,6 @@ static struct core_component comp = {
static int __init most_net_init(void)
{
- spin_lock_init(&list_lock);
mutex_init(&probe_disc_mt);
return most_register_component(&comp);
}
diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
index adca250062e1b..fcd9e111e8bd0 100644
--- a/drivers/staging/most/video/video.c
+++ b/drivers/staging/most/video/video.c
@@ -54,7 +54,7 @@ struct comp_fh {
};
static struct list_head video_devices = LIST_HEAD_INIT(video_devices);
-static struct spinlock list_lock;
+static DEFINE_SPINLOCK(list_lock);
static inline bool data_ready(struct most_video_dev *mdev)
{
@@ -540,7 +540,6 @@ static struct core_component comp = {
static int __init comp_init(void)
{
- spin_lock_init(&list_lock);
return most_register_component(&comp);
}
--
2.20.1
Powered by blists - more mailing lists