[PATCH] Serial: Adjust serial locking
This patch changes the way serial ports are locked when getting modem status. This change is necessary because we will need to atomically read the modem status and take action depending on the CTS status. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
committed by
Russell King
parent
a839688362
commit
c5f4644e6c
@ -1058,12 +1058,9 @@ mpsc_get_mctrl(struct uart_port *port)
|
||||
{
|
||||
struct mpsc_port_info *pi = (struct mpsc_port_info *)port;
|
||||
u32 mflags, status;
|
||||
ulong iflags;
|
||||
|
||||
spin_lock_irqsave(&pi->port.lock, iflags);
|
||||
status = (pi->mirror_regs) ? pi->MPSC_CHR_10_m :
|
||||
readl(pi->mpsc_base + MPSC_CHR_10);
|
||||
spin_unlock_irqrestore(&pi->port.lock, iflags);
|
||||
|
||||
mflags = 0;
|
||||
if (status & 0x1)
|
||||
|
Reference in New Issue
Block a user