summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorYe Bin <yebin10@huawei.com>2021-04-09 11:51:44 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-05-21 15:08:02 +0200
commitca8519ddc4d7e27d941a50e310a0f6bcfafdc8a9 (patch)
tree2441a7d6313a4ac5ad3ad16d0e7b7e645444147d /drivers/media
parent52518e513d6dbb71a9cd8f7a1b83b76fe6f8709c (diff)
media: siano: use DEFINE_MUTEX() for mutex lock and LIST_HEAD for list head
mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). list head can be initialized automatically with LIST_HEAD() rather than explicitly calling INIT_LIST_HEAD(). Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Ye Bin <yebin10@huawei.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/common/siano/smsdvb-main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/common/siano/smsdvb-main.c b/drivers/media/common/siano/smsdvb-main.c
index cd5bafe9a3ac..b8a163a47d09 100644
--- a/drivers/media/common/siano/smsdvb-main.c
+++ b/drivers/media/common/siano/smsdvb-main.c
@@ -26,8 +26,8 @@ Copyright (C) 2006-2008, Uri Shkolnik
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
-static struct list_head g_smsdvb_clients;
-static struct mutex g_smsdvb_clientslock;
+static LIST_HEAD(g_smsdvb_clients);
+static DEFINE_MUTEX(g_smsdvb_clientslock);
static u32 sms_to_guard_interval_table[] = {
[0] = GUARD_INTERVAL_1_32,
@@ -1236,9 +1236,6 @@ static int __init smsdvb_module_init(void)
{
int rc;
- INIT_LIST_HEAD(&g_smsdvb_clients);
- mutex_init(&g_smsdvb_clientslock);
-
smsdvb_debugfs_register();
rc = smscore_register_hotplug(smsdvb_hotplug);