Skip to content

Commit

Permalink
serial: clps711x: Return valid modem controls for port that not suppo…
Browse files Browse the repository at this point in the history
…rt it

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alexander Shiyan authored and Greg Kroah-Hartman committed Oct 24, 2012
1 parent cf03a88 commit 1593daf
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/tty/serial/clps711x.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,20 +191,18 @@ 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;
if (status & SYSFLG1_DSR)
result |= TIOCM_DSR;
if (status & SYSFLG1_CTS)
result |= TIOCM_CTS;
}
} else
result = TIOCM_DSR | TIOCM_CTS | TIOCM_CAR;

return result;
}
Expand Down

0 comments on commit 1593daf

Please sign in to comment.