summaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/farsync.c
diff options
context:
space:
mode:
authorLiu Jian <liujian56@huawei.com>2021-03-26 13:31:38 +0100
committerDavid S. Miller <davem@davemloft.net>2021-03-26 23:25:44 +0100
commita1281601f88e924a2e8c7572065d3e9fecf3c3fb (patch)
treed6d2ed2707185366fa890804511d09585809aa0a /drivers/net/wan/farsync.c
parentMerge branch 'llc-kdoc' (diff)
downloadlinux-a1281601f88e924a2e8c7572065d3e9fecf3c3fb.tar.xz
linux-a1281601f88e924a2e8c7572065d3e9fecf3c3fb.zip
farsync: use DEFINE_SPINLOCK() for spinlock
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Liu Jian <liujian56@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/wan/farsync.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index 686a25d3b512..5de71e44fc5a 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -573,7 +573,7 @@ static DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q);
static DECLARE_TASKLET(fst_int_task, fst_process_int_work_q);
static struct fst_card_info *fst_card_array[FST_MAX_CARDS];
-static spinlock_t fst_work_q_lock;
+static DEFINE_SPINLOCK(fst_work_q_lock);
static u64 fst_work_txq;
static u64 fst_work_intq;
@@ -2648,7 +2648,6 @@ fst_init(void)
for (i = 0; i < FST_MAX_CARDS; i++)
fst_card_array[i] = NULL;
- spin_lock_init(&fst_work_q_lock);
return pci_register_driver(&fst_driver);
}