diff options
Diffstat (limited to 'drivers/char/mxser.c')
-rw-r--r-- | drivers/char/mxser.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index f022f0944434..45d012d85e8c 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -63,7 +63,6 @@ | |||
63 | #include <asm/system.h> | 63 | #include <asm/system.h> |
64 | #include <asm/io.h> | 64 | #include <asm/io.h> |
65 | #include <asm/irq.h> | 65 | #include <asm/irq.h> |
66 | #include <asm/segment.h> | ||
67 | #include <asm/bitops.h> | 66 | #include <asm/bitops.h> |
68 | #include <asm/uaccess.h> | 67 | #include <asm/uaccess.h> |
69 | 68 | ||
@@ -1059,8 +1058,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp) | |||
1059 | */ | 1058 | */ |
1060 | timeout = jiffies + HZ; | 1059 | timeout = jiffies + HZ; |
1061 | while (!(inb(info->base + UART_LSR) & UART_LSR_TEMT)) { | 1060 | while (!(inb(info->base + UART_LSR) & UART_LSR_TEMT)) { |
1062 | set_current_state(TASK_INTERRUPTIBLE); | 1061 | schedule_timeout_interruptible(5); |
1063 | schedule_timeout(5); | ||
1064 | if (time_after(jiffies, timeout)) | 1062 | if (time_after(jiffies, timeout)) |
1065 | break; | 1063 | break; |
1066 | } | 1064 | } |
@@ -1081,10 +1079,8 @@ static void mxser_close(struct tty_struct *tty, struct file *filp) | |||
1081 | info->event = 0; | 1079 | info->event = 0; |
1082 | info->tty = NULL; | 1080 | info->tty = NULL; |
1083 | if (info->blocked_open) { | 1081 | if (info->blocked_open) { |
1084 | if (info->close_delay) { | 1082 | if (info->close_delay) |
1085 | set_current_state(TASK_INTERRUPTIBLE); | 1083 | schedule_timeout_interruptible(info->close_delay); |
1086 | schedule_timeout(info->close_delay); | ||
1087 | } | ||
1088 | wake_up_interruptible(&info->open_wait); | 1084 | wake_up_interruptible(&info->open_wait); |
1089 | } | 1085 | } |
1090 | 1086 | ||
@@ -1802,8 +1798,7 @@ static void mxser_wait_until_sent(struct tty_struct *tty, int timeout) | |||
1802 | #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT | 1798 | #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT |
1803 | printk("lsr = %d (jiff=%lu)...", lsr, jiffies); | 1799 | printk("lsr = %d (jiff=%lu)...", lsr, jiffies); |
1804 | #endif | 1800 | #endif |
1805 | set_current_state(TASK_INTERRUPTIBLE); | 1801 | schedule_timeout_interruptible(char_time); |
1806 | schedule_timeout(char_time); | ||
1807 | if (signal_pending(current)) | 1802 | if (signal_pending(current)) |
1808 | break; | 1803 | break; |
1809 | if (timeout && time_after(jiffies, orig_jiffies + timeout)) | 1804 | if (timeout && time_after(jiffies, orig_jiffies + timeout)) |