diff options
Diffstat (limited to 'drivers/serial/mcfserial.c')
-rw-r--r-- | drivers/serial/mcfserial.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/serial/mcfserial.c b/drivers/serial/mcfserial.c index ddd3aa50d4ad..aafa1704e1ab 100644 --- a/drivers/serial/mcfserial.c +++ b/drivers/serial/mcfserial.c | |||
@@ -1072,18 +1072,6 @@ static int mcfrs_ioctl(struct tty_struct *tty, struct file * file, | |||
1072 | tty_wait_until_sent(tty, 0); | 1072 | tty_wait_until_sent(tty, 0); |
1073 | send_break(info, arg ? arg*(HZ/10) : HZ/4); | 1073 | send_break(info, arg ? arg*(HZ/10) : HZ/4); |
1074 | return 0; | 1074 | return 0; |
1075 | case TIOCGSOFTCAR: | ||
1076 | error = put_user(C_CLOCAL(tty) ? 1 : 0, | ||
1077 | (unsigned long *) arg); | ||
1078 | if (error) | ||
1079 | return error; | ||
1080 | return 0; | ||
1081 | case TIOCSSOFTCAR: | ||
1082 | get_user(arg, (unsigned long *) arg); | ||
1083 | tty->termios->c_cflag = | ||
1084 | ((tty->termios->c_cflag & ~CLOCAL) | | ||
1085 | (arg ? CLOCAL : 0)); | ||
1086 | return 0; | ||
1087 | case TIOCGSERIAL: | 1075 | case TIOCGSERIAL: |
1088 | if (access_ok(VERIFY_WRITE, (void *) arg, | 1076 | if (access_ok(VERIFY_WRITE, (void *) arg, |
1089 | sizeof(struct serial_struct))) | 1077 | sizeof(struct serial_struct))) |
@@ -1222,8 +1210,7 @@ static void mcfrs_close(struct tty_struct *tty, struct file * filp) | |||
1222 | } else | 1210 | } else |
1223 | #endif | 1211 | #endif |
1224 | shutdown(info); | 1212 | shutdown(info); |
1225 | if (tty->driver->flush_buffer) | 1213 | mcfrs_flush_buffer(tty); |
1226 | tty->driver->flush_buffer(tty); | ||
1227 | tty_ldisc_flush(tty); | 1214 | tty_ldisc_flush(tty); |
1228 | 1215 | ||
1229 | tty->closing = 0; | 1216 | tty->closing = 0; |
@@ -1276,6 +1263,8 @@ mcfrs_wait_until_sent(struct tty_struct *tty, int timeout) | |||
1276 | * Note: we have to use pretty tight timings here to satisfy | 1263 | * Note: we have to use pretty tight timings here to satisfy |
1277 | * the NIST-PCTS. | 1264 | * the NIST-PCTS. |
1278 | */ | 1265 | */ |
1266 | lock_kernel(); | ||
1267 | |||
1279 | fifo_time = (MCF5272_FIFO_SIZE * HZ * 10) / info->baud; | 1268 | fifo_time = (MCF5272_FIFO_SIZE * HZ * 10) / info->baud; |
1280 | char_time = fifo_time / 5; | 1269 | char_time = fifo_time / 5; |
1281 | if (char_time == 0) | 1270 | if (char_time == 0) |
@@ -1312,6 +1301,7 @@ mcfrs_wait_until_sent(struct tty_struct *tty, int timeout) | |||
1312 | if (timeout && time_after(jiffies, orig_jiffies + timeout)) | 1301 | if (timeout && time_after(jiffies, orig_jiffies + timeout)) |
1313 | break; | 1302 | break; |
1314 | } | 1303 | } |
1304 | unlock_kernel(); | ||
1315 | #else | 1305 | #else |
1316 | /* | 1306 | /* |
1317 | * For the other coldfire models, assume all data has been sent | 1307 | * For the other coldfire models, assume all data has been sent |