diff options
-rw-r--r-- | arch/ia64/hp/sim/simserial.c | 5 | ||||
-rw-r--r-- | drivers/tty/amiserial.c | 20 | ||||
-rw-r--r-- | include/linux/serialP.h | 2 |
3 files changed, 12 insertions, 15 deletions
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index 614c091b203f..fb324b345e88 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
@@ -535,8 +535,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp) | |||
535 | tty_ldisc_flush(tty); | 535 | tty_ldisc_flush(tty); |
536 | info->tport.tty = NULL; | 536 | info->tport.tty = NULL; |
537 | if (info->tport.blocked_open) { | 537 | if (info->tport.blocked_open) { |
538 | if (info->close_delay) | 538 | if (info->tport.close_delay) |
539 | schedule_timeout_interruptible(info->close_delay); | 539 | schedule_timeout_interruptible(info->tport.close_delay); |
540 | wake_up_interruptible(&info->tport.open_wait); | 540 | wake_up_interruptible(&info->tport.open_wait); |
541 | } | 541 | } |
542 | info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); | 542 | info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); |
@@ -829,6 +829,7 @@ simrs_init (void) | |||
829 | */ | 829 | */ |
830 | for (i = 0, state = rs_table; i < NR_PORTS; i++,state++) { | 830 | for (i = 0, state = rs_table; i < NR_PORTS; i++,state++) { |
831 | tty_port_init(&state->tport); | 831 | tty_port_init(&state->tport); |
832 | state->tport.close_delay = 0; /* XXX really 0? */ | ||
832 | 833 | ||
833 | if (state->type == PORT_UNKNOWN) continue; | 834 | if (state->type == PORT_UNKNOWN) continue; |
834 | 835 | ||
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index 71d3331d6e84..06e3a0990c8b 100644 --- a/drivers/tty/amiserial.c +++ b/drivers/tty/amiserial.c | |||
@@ -1022,8 +1022,8 @@ static int get_serial_info(struct serial_state *state, | |||
1022 | tmp.flags = state->flags; | 1022 | tmp.flags = state->flags; |
1023 | tmp.xmit_fifo_size = state->xmit_fifo_size; | 1023 | tmp.xmit_fifo_size = state->xmit_fifo_size; |
1024 | tmp.baud_base = state->baud_base; | 1024 | tmp.baud_base = state->baud_base; |
1025 | tmp.close_delay = state->close_delay; | 1025 | tmp.close_delay = state->tport.close_delay; |
1026 | tmp.closing_wait = state->closing_wait; | 1026 | tmp.closing_wait = state->tport.closing_wait; |
1027 | tmp.custom_divisor = state->custom_divisor; | 1027 | tmp.custom_divisor = state->custom_divisor; |
1028 | tty_unlock(); | 1028 | tty_unlock(); |
1029 | if (copy_to_user(retinfo,&tmp,sizeof(*retinfo))) | 1029 | if (copy_to_user(retinfo,&tmp,sizeof(*retinfo))) |
@@ -1052,7 +1052,7 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state, | |||
1052 | 1052 | ||
1053 | if (!serial_isroot()) { | 1053 | if (!serial_isroot()) { |
1054 | if ((new_serial.baud_base != state->baud_base) || | 1054 | if ((new_serial.baud_base != state->baud_base) || |
1055 | (new_serial.close_delay != state->close_delay) || | 1055 | (new_serial.close_delay != state->tport.close_delay) || |
1056 | (new_serial.xmit_fifo_size != state->xmit_fifo_size) || | 1056 | (new_serial.xmit_fifo_size != state->xmit_fifo_size) || |
1057 | ((new_serial.flags & ~ASYNC_USR_MASK) != | 1057 | ((new_serial.flags & ~ASYNC_USR_MASK) != |
1058 | (state->flags & ~ASYNC_USR_MASK))) | 1058 | (state->flags & ~ASYNC_USR_MASK))) |
@@ -1077,8 +1077,8 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state, | |||
1077 | state->flags = ((state->flags & ~ASYNC_FLAGS) | | 1077 | state->flags = ((state->flags & ~ASYNC_FLAGS) | |
1078 | (new_serial.flags & ASYNC_FLAGS)); | 1078 | (new_serial.flags & ASYNC_FLAGS)); |
1079 | state->custom_divisor = new_serial.custom_divisor; | 1079 | state->custom_divisor = new_serial.custom_divisor; |
1080 | state->close_delay = new_serial.close_delay * HZ/100; | 1080 | state->tport.close_delay = new_serial.close_delay * HZ/100; |
1081 | state->closing_wait = new_serial.closing_wait * HZ/100; | 1081 | state->tport.closing_wait = new_serial.closing_wait * HZ/100; |
1082 | tty->low_latency = (state->flags & ASYNC_LOW_LATENCY) ? 1 : 0; | 1082 | tty->low_latency = (state->flags & ASYNC_LOW_LATENCY) ? 1 : 0; |
1083 | 1083 | ||
1084 | check_and_exit: | 1084 | check_and_exit: |
@@ -1413,8 +1413,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp) | |||
1413 | * the line discipline to only process XON/XOFF characters. | 1413 | * the line discipline to only process XON/XOFF characters. |
1414 | */ | 1414 | */ |
1415 | tty->closing = 1; | 1415 | tty->closing = 1; |
1416 | if (state->closing_wait != ASYNC_CLOSING_WAIT_NONE) | 1416 | if (state->tport.closing_wait != ASYNC_CLOSING_WAIT_NONE) |
1417 | tty_wait_until_sent(tty, state->closing_wait); | 1417 | tty_wait_until_sent(tty, state->tport.closing_wait); |
1418 | /* | 1418 | /* |
1419 | * At this point we stop accepting input. To do this, we | 1419 | * At this point we stop accepting input. To do this, we |
1420 | * disable the receive line status interrupts, and tell the | 1420 | * disable the receive line status interrupts, and tell the |
@@ -1444,8 +1444,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp) | |||
1444 | tty->closing = 0; | 1444 | tty->closing = 0; |
1445 | state->tport.tty = NULL; | 1445 | state->tport.tty = NULL; |
1446 | if (state->tport.blocked_open) { | 1446 | if (state->tport.blocked_open) { |
1447 | if (state->close_delay) { | 1447 | if (state->tport.close_delay) { |
1448 | msleep_interruptible(jiffies_to_msecs(state->close_delay)); | 1448 | msleep_interruptible(jiffies_to_msecs(state->tport.close_delay)); |
1449 | } | 1449 | } |
1450 | wake_up_interruptible(&state->tport.open_wait); | 1450 | wake_up_interruptible(&state->tport.open_wait); |
1451 | } | 1451 | } |
@@ -1863,8 +1863,6 @@ static int __init amiga_serial_probe(struct platform_device *pdev) | |||
1863 | state->port = (int)&custom.serdatr; /* Just to give it a value */ | 1863 | state->port = (int)&custom.serdatr; /* Just to give it a value */ |
1864 | state->line = 0; | 1864 | state->line = 0; |
1865 | state->custom_divisor = 0; | 1865 | state->custom_divisor = 0; |
1866 | state->close_delay = 5*HZ/10; | ||
1867 | state->closing_wait = 30*HZ; | ||
1868 | state->icount.cts = state->icount.dsr = | 1866 | state->icount.cts = state->icount.dsr = |
1869 | state->icount.rng = state->icount.dcd = 0; | 1867 | state->icount.rng = state->icount.dcd = 0; |
1870 | state->icount.rx = state->icount.tx = 0; | 1868 | state->icount.rx = state->icount.tx = 0; |
diff --git a/include/linux/serialP.h b/include/linux/serialP.h index 32d45b869cbc..997edd008b92 100644 --- a/include/linux/serialP.h +++ b/include/linux/serialP.h | |||
@@ -36,8 +36,6 @@ struct serial_state { | |||
36 | int xmit_fifo_size; | 36 | int xmit_fifo_size; |
37 | int custom_divisor; | 37 | int custom_divisor; |
38 | int count; | 38 | int count; |
39 | unsigned short close_delay; | ||
40 | unsigned short closing_wait; /* time to wait before closing */ | ||
41 | struct async_icount icount; | 39 | struct async_icount icount; |
42 | struct tty_port tport; | 40 | struct tty_port tport; |
43 | 41 | ||