summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2020-12-24 21:25:19 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-28 15:09:28 +0100
commit6abeae2adc96a2d6eb1973b221e40cc776557197 (patch)
treebd85db98d16dcbb5d75e728baef6dc7c9c3bfba5 /drivers/staging
parentdf94d3b2a9a46477f4a5ea58fa6dc360046bd827 (diff)
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: Zheng Yongjun <zhengyongjun3@huawei.com> Link: https://lore.kernel.org/r/20201224132519.31504-1-zhengyongjun3@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/most/net/net.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/most/net/net.c b/drivers/staging/most/net/net.c
index b6fecb06a0e6..f125bb6da406 100644
--- a/drivers/staging/most/net/net.c
+++ b/drivers/staging/most/net/net.c
@@ -68,7 +68,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 DEFINE_MUTEX(probe_disc_mt); /* ch->linked = true, most_nd_open */
static DEFINE_SPINLOCK(list_lock); /* list_head, ch->linked = false, dev_hold */
static struct most_component comp;
@@ -520,7 +520,6 @@ static int __init most_net_init(void)
{
int err;
- mutex_init(&probe_disc_mt);
err = most_register_component(&comp);
if (err)
return err;