projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a605260
)
tty: serial: icom: Use DEFINE_SPINLOCK() for spinlock
author
Zheng Yongjun
<zhengyongjun3@huawei.com>
Wed, 23 Dec 2020 14:14:38 +0000
(22:14 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 28 Dec 2020 15:14:01 +0000
(16:14 +0100)
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>
drivers/tty/serial/icom.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/icom.c
b/drivers/tty/serial/icom.c
index 94c8281ddb5f2d12bcec58e7b9e74e4ced65e059..9a872750581c93c90f8177e7b769049b5587f147 100644
(file)
--- 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;