diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2019-07-26 14:22:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-30 10:52:04 +0300 |
commit | a20eefaee64610541d125cd2c10fa25e278f0bee (patch) | |
tree | 770c6d277ba762b4e37481b190983f9245196d2b /drivers/staging/most/net | |
parent | 5f251e986de05af8a177bfc632980cc64a4d3e7e (diff) | |
download | linux-a20eefaee64610541d125cd2c10fa25e278f0bee.tar.xz |
staging: most: Use DEFINE_SPINLOCK() instead of struct spinlock
For spinlocks the type spinlock_t should be used instead of "struct
spinlock".
Use DEFINE_SPINLOCK() and spare the run time initialization
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190704153803.12739-5-bigeasy@linutronix.de
Link: https://lore.kernel.org/r/alpine.DEB.2.21.1907261319100.1791@nanos.tec.linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most/net')
-rw-r--r-- | drivers/staging/most/net/net.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/most/net/net.c b/drivers/staging/most/net/net.c index aababdf2be12..26a31854c636 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) @@ -509,7 +509,6 @@ static int __init most_net_init(void) { int err; - spin_lock_init(&list_lock); mutex_init(&probe_disc_mt); err = most_register_component(&comp); if (err) |