diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-09-29 02:01:38 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 09:18:24 -0700 |
commit | d720bc4b8fc5d6d179ef094908d4fbb5e436ffad (patch) | |
tree | 63468b72b89791971403a4826cc6f7dc1d07232c /drivers | |
parent | 13c73f045f2ac33219729678f4a9389d4ccab799 (diff) | |
download | lwn-d720bc4b8fc5d6d179ef094908d4fbb5e436ffad.tar.gz lwn-d720bc4b8fc5d6d179ef094908d4fbb5e436ffad.zip |
[PATCH] generic_serial: remove private decoding of baud rate bits
The driver has no business doing this work itself any more and hasn't for some
years. When the new speed stuff goes in this will break entirely so fix it up
ready.
Also remove a #if 0 around a comment....
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/generic_serial.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c index 5e59c0b42731..4711d9b3a595 100644 --- a/drivers/char/generic_serial.c +++ b/drivers/char/generic_serial.c @@ -746,11 +746,9 @@ void gs_set_termios (struct tty_struct * tty, gs_dprintk (GS_DEBUG_TERMIOS, "termios structure (%p):\n", tiosp); } -#if 0 /* This is an optimization that is only allowed for dumb cards */ /* Smart cards require knowledge of iflags and oflags too: that might change hardware cooking mode.... */ -#endif if (old_termios) { if( (tiosp->c_iflag == old_termios->c_iflag) && (tiosp->c_oflag == old_termios->c_oflag) @@ -774,14 +772,7 @@ void gs_set_termios (struct tty_struct * tty, if(!memcmp(tiosp->c_cc, old_termios->c_cc, NCC)) printk("c_cc changed\n"); } - baudrate = tiosp->c_cflag & CBAUD; - if (baudrate & CBAUDEX) { - baudrate &= ~CBAUDEX; - if ((baudrate < 1) || (baudrate > 4)) - tiosp->c_cflag &= ~CBAUDEX; - else - baudrate += 15; - } + baudrate = tty_get_baud_rate(tty); baudrate = gs_baudrates[baudrate]; if ((tiosp->c_cflag & CBAUD) == B38400) { |