Commit ca8519dd authored by Ye Bin's avatar Ye Bin Committed by Mauro Carvalho Chehab
Browse files

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYe Bin <yebin10@huawei.com>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 52518e51
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -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);