Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b54bf3b2 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman
Browse files

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: default avatarJiri 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: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 027d7dac
Loading
Loading
Loading
Loading
+1 −6
Original line number Original line Diff line number Diff line
@@ -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)
static void atmel_set_ldisc(struct uart_port *port, int new)
{
{
	int line = port->line;
	if (new == N_PPS) {

	if (line >= port->state->port.tty->driver->num)
		return;

	if (port->state->port.tty->ldisc->ops->num == N_PPS) {
		port->flags |= UPF_HARDPPS_CD;
		port->flags |= UPF_HARDPPS_CD;
		atmel_enable_ms(port);
		atmel_enable_ms(port);
	} else {
	} else {