summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/icom.c
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2020-12-23 15:14:38 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-28 16:14:01 +0100
commit01493ccb4436aadcaf8f33cd5d524a5d68f22836 (patch)
treed19e9fbbb4ec199a4bdc3a2362ecba4dcaee5b54 /drivers/tty/serial/icom.c
parenttty: serial: cpm_uart: Add udbg support for enabling xmon (diff)
downloadlinux-01493ccb4436aadcaf8f33cd5d524a5d68f22836.tar.xz
linux-01493ccb4436aadcaf8f33cd5d524a5d68f22836.zip
tty: serial: icom: Use DEFINE_SPINLOCK() for spinlock
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Link: https://lore.kernel.org/r/20201223141438.889-1-zhengyongjun3@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r--drivers/tty/serial/icom.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c
index 94c8281ddb5f..9a872750581c 100644
--- a/drivers/tty/serial/icom.c
+++ b/drivers/tty/serial/icom.c
@@ -118,7 +118,7 @@ MODULE_DEVICE_TABLE(pci, icom_pci_table);
static LIST_HEAD(icom_adapter_head);
/* spinlock for adapter initialization and changing adapter operations */
-static spinlock_t icom_lock;
+static DEFINE_SPINLOCK(icom_lock);
#ifdef ICOM_TRACE
static inline void trace(struct icom_port *icom_port, char *trace_pt,
@@ -1616,8 +1616,6 @@ static int __init icom_init(void)
{
int ret;
- spin_lock_init(&icom_lock);
-
ret = uart_register_driver(&icom_uart_driver);
if (ret)
return ret;