Commit 1593daf9 authored by Alexander Shiyan's avatar Alexander Shiyan Committed by Greg Kroah-Hartman

serial: clps711x: Return valid modem controls for port that not support it

Signed-off-by: default avatarAlexander Shiyan <shc_work@mail.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cf03a884
...@@ -191,12 +191,9 @@ static unsigned int clps711xuart_tx_empty(struct uart_port *port) ...@@ -191,12 +191,9 @@ static unsigned int clps711xuart_tx_empty(struct uart_port *port)
static unsigned int clps711xuart_get_mctrl(struct uart_port *port) static unsigned int clps711xuart_get_mctrl(struct uart_port *port)
{ {
unsigned int port_addr; unsigned int status, result = 0;
unsigned int result = 0;
unsigned int status;
port_addr = SYSFLG(port); if (port->line == 0) {
if (port_addr == SYSFLG1) {
status = clps_readl(SYSFLG1); status = clps_readl(SYSFLG1);
if (status & SYSFLG1_DCD) if (status & SYSFLG1_DCD)
result |= TIOCM_CAR; result |= TIOCM_CAR;
...@@ -204,7 +201,8 @@ static unsigned int clps711xuart_get_mctrl(struct uart_port *port) ...@@ -204,7 +201,8 @@ static unsigned int clps711xuart_get_mctrl(struct uart_port *port)
result |= TIOCM_DSR; result |= TIOCM_DSR;
if (status & SYSFLG1_CTS) if (status & SYSFLG1_CTS)
result |= TIOCM_CTS; result |= TIOCM_CTS;
} } else
result = TIOCM_DSR | TIOCM_CTS | TIOCM_CAR;
return result; return result;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment