Commit 6abeae2a authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Greg Kroah-Hartman

staging: most: net: use DEFINE_MUTEX() for mutex lock

mutex lock can be initialized automatically with DEFINE_MUTEX()
rather than explicitly calling mutex_init().
Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20201224132519.31504-1-zhengyongjun3@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent df94d3b2
...@@ -68,7 +68,7 @@ struct net_dev_context { ...@@ -68,7 +68,7 @@ struct net_dev_context {
}; };
static struct list_head net_devices = LIST_HEAD_INIT(net_devices); static struct list_head net_devices = LIST_HEAD_INIT(net_devices);
static struct mutex probe_disc_mt; /* ch->linked = true, most_nd_open */ static DEFINE_MUTEX(probe_disc_mt); /* ch->linked = true, most_nd_open */
static DEFINE_SPINLOCK(list_lock); /* list_head, ch->linked = false, dev_hold */ static DEFINE_SPINLOCK(list_lock); /* list_head, ch->linked = false, dev_hold */
static struct most_component comp; static struct most_component comp;
...@@ -520,7 +520,6 @@ static int __init most_net_init(void) ...@@ -520,7 +520,6 @@ static int __init most_net_init(void)
{ {
int err; int err;
mutex_init(&probe_disc_mt);
err = most_register_component(&comp); err = most_register_component(&comp);
if (err) if (err)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment