Commit d720bc4b authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[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: default avatarAlan Cox <alan@redhat.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 13c73f04
...@@ -746,11 +746,9 @@ void gs_set_termios (struct tty_struct * tty, ...@@ -746,11 +746,9 @@ void gs_set_termios (struct tty_struct * tty,
gs_dprintk (GS_DEBUG_TERMIOS, "termios structure (%p):\n", tiosp); gs_dprintk (GS_DEBUG_TERMIOS, "termios structure (%p):\n", tiosp);
} }
#if 0
/* This is an optimization that is only allowed for dumb cards */ /* This is an optimization that is only allowed for dumb cards */
/* Smart cards require knowledge of iflags and oflags too: that /* Smart cards require knowledge of iflags and oflags too: that
might change hardware cooking mode.... */ might change hardware cooking mode.... */
#endif
if (old_termios) { if (old_termios) {
if( (tiosp->c_iflag == old_termios->c_iflag) if( (tiosp->c_iflag == old_termios->c_iflag)
&& (tiosp->c_oflag == old_termios->c_oflag) && (tiosp->c_oflag == old_termios->c_oflag)
...@@ -774,14 +772,7 @@ void gs_set_termios (struct tty_struct * tty, ...@@ -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"); if(!memcmp(tiosp->c_cc, old_termios->c_cc, NCC)) printk("c_cc changed\n");
} }
baudrate = tiosp->c_cflag & CBAUD; baudrate = tty_get_baud_rate(tty);
if (baudrate & CBAUDEX) {
baudrate &= ~CBAUDEX;
if ((baudrate < 1) || (baudrate > 4))
tiosp->c_cflag &= ~CBAUDEX;
else
baudrate += 15;
}
baudrate = gs_baudrates[baudrate]; baudrate = gs_baudrates[baudrate];
if ((tiosp->c_cflag & CBAUD) == B38400) { if ((tiosp->c_cflag & CBAUD) == B38400) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment