]> git.baikalelectronics.ru Git - kernel.git/commit
tty: serial: imx: add lock for registers save/restore
authorAnson Huang <Anson.Huang@nxp.com>
Wed, 5 Sep 2018 01:24:26 +0000 (09:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Sep 2018 14:07:24 +0000 (16:07 +0200)
commit97211b1e9849e7974f5e347a6fc454302a886f34
tree58ad1807ac2c3ff5dbfbdb006e8ab9f5995decfc
parent798d6365dacdd0f51937c60121ed5850621bc6ca
tty: serial: imx: add lock for registers save/restore

In noirq suspend/resume stage with no_console_suspend enabled,
imx_uart_console_write() may be called to print out log_buf
message by printk(), so there will be race condition between
imx_uart_console_write() and imx_uart_save/restore_context(),
need to add lock to protect the registers save/restore operations.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c