[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>
Tento commit je obsažen v:
Russell King
2005-06-29 09:42:38 +01:00
odevzdal Russell King
rodič a839688362
revize c5f4644e6c
12 změnil soubory, kde provedl 29 přidání a 41 odebrání

Zobrazit soubor

@@ -442,13 +442,10 @@ static unsigned int serial_txx9_tx_empty(struct uart_port *port)
static unsigned int serial_txx9_get_mctrl(struct uart_port *port)
{
struct uart_txx9_port *up = (struct uart_txx9_port *)port;
unsigned long flags;
unsigned int ret;
spin_lock_irqsave(&up->port.lock, flags);
ret = ((sio_in(up, TXX9_SIFLCR) & TXX9_SIFLCR_RTSSC) ? 0 : TIOCM_RTS)
| ((sio_in(up, TXX9_SICISR) & TXX9_SICISR_CTSS) ? 0 : TIOCM_CTS);
spin_unlock_irqrestore(&up->port.lock, flags);
return ret;
}