diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2019-08-27 14:46:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-04 13:43:55 +0300 |
commit | 06e9b2fe7f1279bea649002cc40cce54a383f052 (patch) | |
tree | ed8c1db762a40de1023606eb49bb4021e5c33e20 /drivers/tty | |
parent | 8428413b1d14fc880b805c98f571169e7f1ac369 (diff) | |
download | linux-06e9b2fe7f1279bea649002cc40cce54a383f052.tar.xz |
tty: serial: linflexuart: Use DEFINE_SPINLOCK() for spinlock
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20190827114614.102037-1-weiyongjun1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/fsl_linflexuart.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/tty/serial/fsl_linflexuart.c b/drivers/tty/serial/fsl_linflexuart.c index 26b9601a0952..8aea7822b731 100644 --- a/drivers/tty/serial/fsl_linflexuart.c +++ b/drivers/tty/serial/fsl_linflexuart.c @@ -136,7 +136,7 @@ MODULE_DEVICE_TABLE(of, linflex_dt_ids); #ifdef CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE static struct uart_port *earlycon_port; static bool linflex_earlycon_same_instance; -static spinlock_t init_lock; +static DEFINE_SPINLOCK(init_lock); static bool during_init; static struct { @@ -922,10 +922,6 @@ static int __init linflex_serial_init(void) if (ret) uart_unregister_driver(&linflex_reg); -#ifdef CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE - spin_lock_init(&init_lock); -#endif - return ret; } |