lkml.org 
[lkml]   [2011]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/10] TTY: serial, cleanup atmel_set_ldisc
On 11/09/2011 09:33 PM, Jiri Slaby :
> 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: Greg Kroah-Hartman <gregkh@suse.de>
> Cc: Alan Cox <alan@linux.intel.com>
> Cc: Viktar Palstsiuk <viktar.palstsiuk@promwad.com>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
> drivers/tty/serial/atmel_serial.c | 7 +------
> 1 files changed, 1 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 4a0f86f..6b844d4 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 {


--
Nicolas Ferre


\
 
 \ /
  Last update: 2011-11-15 10:11    [W:0.043 / U:1.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site