serial: altera_uart: fix locking in polling mode
authorGabriel Somlo <gsomlo@gmail.com>
Tue, 22 Nov 2022 20:04:26 +0000 (15:04 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:40 +0000 (13:32 +0100)
commitca89c2eb36ed2e71554470d337b3811f802faab7
tree06cc9598e0a3b4148e3279bbeaf5d86fde360ba3
parent516614a371c26e3334625b4bca19a5362bf658d6
serial: altera_uart: fix locking in polling mode

[ Upstream commit 1307c5d33cce8a41dd77c2571e4df65a5b627feb ]

Since altera_uart_interrupt() may also be called from
a poll timer in "serving_softirq" context, use
spin_[lock_irqsave|unlock_irqrestore] variants, which
are appropriate for both softirq and hardware interrupt
contexts.

Fixes: 2f8b9c15cd88 ("altera_uart: Add support for polling mode (IRQ-less)")
Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
Link: https://lore.kernel.org/r/20221122200426.888349-1-gsomlo@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/altera_uart.c