summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2012-10-14 11:05:28 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-24 11:39:47 -0700
commit1593daf9a84f4b29e90027e0999c93da1d25478b (patch)
tree7e1dd93c9c9fcdffe6d5f33bc60881546543ef0d
parentcf03a884b9f4a63d4bcf29614fe03ca3f8299138 (diff)
downloadop-kernel-dev-1593daf9a84f4b29e90027e0999c93da1d25478b.zip
op-kernel-dev-1593daf9a84f4b29e90027e0999c93da1d25478b.tar.gz
serial: clps711x: Return valid modem controls for port that not support it
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/clps711x.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c
index d374609..7b0e539 100644
--- a/drivers/tty/serial/clps711x.c
+++ b/drivers/tty/serial/clps711x.c
@@ -191,12 +191,9 @@ static unsigned int clps711xuart_tx_empty(struct uart_port *port)
static unsigned int clps711xuart_get_mctrl(struct uart_port *port)
{
- unsigned int port_addr;
- unsigned int result = 0;
- unsigned int status;
+ unsigned int status, result = 0;
- port_addr = SYSFLG(port);
- if (port_addr == SYSFLG1) {
+ if (port->line == 0) {
status = clps_readl(SYSFLG1);
if (status & SYSFLG1_DCD)
result |= TIOCM_CAR;
@@ -204,7 +201,8 @@ static unsigned int clps711xuart_get_mctrl(struct uart_port *port)
result |= TIOCM_DSR;
if (status & SYSFLG1_CTS)
result |= TIOCM_CTS;
- }
+ } else
+ result = TIOCM_DSR | TIOCM_CTS | TIOCM_CAR;
return result;
}
OpenPOWER on IntegriCloud