summaryrefslogtreecommitdiff
path: root/drivers/tty/serial
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2011-11-09 21:33:44 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-15 15:58:57 -0800
commitb54bf3b24908cd4f6a1d24276f795cfbccba5a3f (patch)
tree80656d69e054639d78e2f6c0713a7ae6e3e2545f /drivers/tty/serial
parent027d7dacf73273dbe07a75b2ef5579616f17272c (diff)
downloadlinux-3.10-b54bf3b24908cd4f6a1d24276f795cfbccba5a3f.tar.gz
linux-3.10-b54bf3b24908cd4f6a1d24276f795cfbccba5a3f.tar.bz2
linux-3.10-b54bf3b24908cd4f6a1d24276f795cfbccba5a3f.zip
TTY: serial, cleanup atmel_set_ldisc
Current ldisc number is passed as a paramneter -- no need to dig it out of the tty or ldisc. So switch PPS check to that. No tty callback can be called with port->line higher than TTY driver num. So remove the check. This removes some port.tty users. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@linux.intel.com> Cc: Viktar Palstsiuk <viktar.palstsiuk@promwad.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r--drivers/tty/serial/atmel_serial.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 4a0f86fa1e9..6b844d42257 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -1256,12 +1256,7 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
static void atmel_set_ldisc(struct uart_port *port, int new)
{
- int line = port->line;
-
- if (line >= port->state->port.tty->driver->num)
- return;
-
- if (port->state->port.tty->ldisc->ops->num == N_PPS) {
+ if (new == N_PPS) {
port->flags |= UPF_HARDPPS_CD;
atmel_enable_ms(port);
} else {