mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 23:46:53 +07:00
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>
This commit is contained in:
parent
8428413b1d
commit
06e9b2fe7f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user