From: Muhammad Usama Anjum <musamaanjum@gmail.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
"open list:SIANO DVB DRIVER" <linux-media@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
zhengyongjun3@huawei.com, kernel-janitors@vger.kernel.org,
colin.king@canonical.com, dan.carpenter@oracle.com
Cc: musamaanjum@gmail.com
Subject: [PATCH] media: siano: use DEFINE_MUTEX() for mutex lock
Date: Tue, 6 Apr 2021 01:52:19 +0500 [thread overview]
Message-ID: <20210405205219.GA687366@LEGION> (raw)
mutex lock can be initialized with DEFINE_MUTEX() rather than
explicitly calling mutex_init().
Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
---
drivers/media/common/siano/smscoreapi.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/media/common/siano/smscoreapi.c b/drivers/media/common/siano/smscoreapi.c
index 410cc3ac6f94..7f5b638d2458 100644
--- a/drivers/media/common/siano/smscoreapi.c
+++ b/drivers/media/common/siano/smscoreapi.c
@@ -414,10 +414,10 @@ struct smscore_registry_entry_t {
static struct list_head g_smscore_notifyees;
static struct list_head g_smscore_devices;
-static struct mutex g_smscore_deviceslock;
+static DEFINE_MUTEX(g_smscore_deviceslock);
static struct list_head g_smscore_registry;
-static struct mutex g_smscore_registrylock;
+static DEFINE_MUTEX(g_smscore_registrylock);
static int default_mode = DEVICE_MODE_NONE;
@@ -2123,10 +2123,7 @@ static int __init smscore_module_init(void)
{
INIT_LIST_HEAD(&g_smscore_notifyees);
INIT_LIST_HEAD(&g_smscore_devices);
- mutex_init(&g_smscore_deviceslock);
-
INIT_LIST_HEAD(&g_smscore_registry);
- mutex_init(&g_smscore_registrylock);
return 0;
}
--
2.25.1
next reply other threads:[~2021-04-05 20:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-05 20:52 Muhammad Usama Anjum [this message]
2021-04-28 16:14 ` [PATCH] media: siano: use DEFINE_MUTEX() for mutex lock Muhammad Usama Anjum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210405205219.GA687366@LEGION \
--to=musamaanjum@gmail.com \
--cc=colin.king@canonical.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=zhengyongjun3@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.