diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-09-29 05:01:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 12:18:24 -0400 |
commit | 67cc0161ecc9ebee6eba4af6cbfdba028090b1b9 (patch) | |
tree | 2a115aac9872851a4c886c51c8fda2f593c44c00 /drivers | |
parent | 1db27c11e9a0c6d659040ac0b7c64a339e248fa1 (diff) |
[PATCH] specialix - remove private speed decoding
Signed-off-by: Alan Cox <alan@redhat.com>
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/specialix.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c index a1d303f9a33d..c0ef0f0e5800 100644 --- a/drivers/char/specialix.c +++ b/drivers/char/specialix.c | |||
@@ -1087,24 +1087,16 @@ static void sx_change_speed(struct specialix_board *bp, struct specialix_port *p | |||
1087 | port->MSVR = (sx_in(bp, CD186x_MSVR) & MSVR_RTS); | 1087 | port->MSVR = (sx_in(bp, CD186x_MSVR) & MSVR_RTS); |
1088 | spin_unlock_irqrestore(&bp->lock, flags); | 1088 | spin_unlock_irqrestore(&bp->lock, flags); |
1089 | dprintk (SX_DEBUG_TERMIOS, "sx: got MSVR=%02x.\n", port->MSVR); | 1089 | dprintk (SX_DEBUG_TERMIOS, "sx: got MSVR=%02x.\n", port->MSVR); |
1090 | baud = C_BAUD(tty); | 1090 | baud = tty_get_baud_rate(tty); |
1091 | 1091 | ||
1092 | if (baud & CBAUDEX) { | 1092 | if (baud == 38400) { |
1093 | baud &= ~CBAUDEX; | ||
1094 | if (baud < 1 || baud > 2) | ||
1095 | port->tty->termios->c_cflag &= ~CBAUDEX; | ||
1096 | else | ||
1097 | baud += 15; | ||
1098 | } | ||
1099 | if (baud == 15) { | ||
1100 | if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI) | 1093 | if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI) |
1101 | baud ++; | 1094 | baud ++; |
1102 | if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI) | 1095 | if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI) |
1103 | baud += 2; | 1096 | baud += 2; |
1104 | } | 1097 | } |
1105 | 1098 | ||
1106 | 1099 | if (!baud) { | |
1107 | if (!baud_table[baud]) { | ||
1108 | /* Drop DTR & exit */ | 1100 | /* Drop DTR & exit */ |
1109 | dprintk (SX_DEBUG_TERMIOS, "Dropping DTR... Hmm....\n"); | 1101 | dprintk (SX_DEBUG_TERMIOS, "Dropping DTR... Hmm....\n"); |
1110 | if (!SX_CRTSCTS (tty)) { | 1102 | if (!SX_CRTSCTS (tty)) { |
@@ -1134,7 +1126,7 @@ static void sx_change_speed(struct specialix_board *bp, struct specialix_port *p | |||
1134 | "This is an untested option, please be carefull.\n", | 1126 | "This is an untested option, please be carefull.\n", |
1135 | port_No (port), tmp); | 1127 | port_No (port), tmp); |
1136 | else | 1128 | else |
1137 | tmp = (((SX_OSCFREQ + baud_table[baud]/2) / baud_table[baud] + | 1129 | tmp = (((SX_OSCFREQ + baud/2) / baud + |
1138 | CD186x_TPC/2) / CD186x_TPC); | 1130 | CD186x_TPC/2) / CD186x_TPC); |
1139 | 1131 | ||
1140 | if ((tmp < 0x10) && time_before(again, jiffies)) { | 1132 | if ((tmp < 0x10) && time_before(again, jiffies)) { |