diff options
Diffstat (limited to 'drivers/serial/68360serial.c')
-rw-r--r-- | drivers/serial/68360serial.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c index 6f540107d0bb..f4f737bfa0a7 100644 --- a/drivers/serial/68360serial.c +++ b/drivers/serial/68360serial.c | |||
@@ -1436,18 +1436,6 @@ static int rs_360_ioctl(struct tty_struct *tty, struct file * file, | |||
1436 | return retval; | 1436 | return retval; |
1437 | end_break(info); | 1437 | end_break(info); |
1438 | return 0; | 1438 | return 0; |
1439 | case TIOCGSOFTCAR: | ||
1440 | /* return put_user(C_CLOCAL(tty) ? 1 : 0, (int *) arg); */ | ||
1441 | put_user(C_CLOCAL(tty) ? 1 : 0, (int *) arg); | ||
1442 | return 0; | ||
1443 | case TIOCSSOFTCAR: | ||
1444 | error = get_user(arg, (unsigned int *) arg); | ||
1445 | if (error) | ||
1446 | return error; | ||
1447 | tty->termios->c_cflag = | ||
1448 | ((tty->termios->c_cflag & ~CLOCAL) | | ||
1449 | (arg ? CLOCAL : 0)); | ||
1450 | return 0; | ||
1451 | #ifdef maybe | 1439 | #ifdef maybe |
1452 | case TIOCSERGETLSR: /* Get line status register */ | 1440 | case TIOCSERGETLSR: /* Get line status register */ |
1453 | return get_lsr_info(info, (unsigned int *) arg); | 1441 | return get_lsr_info(info, (unsigned int *) arg); |
@@ -1665,8 +1653,7 @@ static void rs_360_close(struct tty_struct *tty, struct file * filp) | |||
1665 | rs_360_wait_until_sent(tty, info->timeout); | 1653 | rs_360_wait_until_sent(tty, info->timeout); |
1666 | } | 1654 | } |
1667 | shutdown(info); | 1655 | shutdown(info); |
1668 | if (tty->driver->flush_buffer) | 1656 | rs_360_flush_buffer(tty); |
1669 | tty->driver->flush_buffer(tty); | ||
1670 | tty_ldisc_flush(tty); | 1657 | tty_ldisc_flush(tty); |
1671 | tty->closing = 0; | 1658 | tty->closing = 0; |
1672 | info->event = 0; | 1659 | info->event = 0; |
@@ -1717,6 +1704,7 @@ static void rs_360_wait_until_sent(struct tty_struct *tty, int timeout) | |||
1717 | printk("jiff=%lu...", jiffies); | 1704 | printk("jiff=%lu...", jiffies); |
1718 | #endif | 1705 | #endif |
1719 | 1706 | ||
1707 | lock_kernel(); | ||
1720 | /* We go through the loop at least once because we can't tell | 1708 | /* We go through the loop at least once because we can't tell |
1721 | * exactly when the last character exits the shifter. There can | 1709 | * exactly when the last character exits the shifter. There can |
1722 | * be at least two characters waiting to be sent after the buffers | 1710 | * be at least two characters waiting to be sent after the buffers |
@@ -1745,6 +1733,7 @@ static void rs_360_wait_until_sent(struct tty_struct *tty, int timeout) | |||
1745 | bdp--; | 1733 | bdp--; |
1746 | } while (bdp->status & BD_SC_READY); | 1734 | } while (bdp->status & BD_SC_READY); |
1747 | current->state = TASK_RUNNING; | 1735 | current->state = TASK_RUNNING; |
1736 | unlock_kernel(); | ||
1748 | #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT | 1737 | #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT |
1749 | printk("lsr = %d (jiff=%lu)...done\n", lsr, jiffies); | 1738 | printk("lsr = %d (jiff=%lu)...done\n", lsr, jiffies); |
1750 | #endif | 1739 | #endif |