aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/crisv10.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2013-03-07 07:12:38 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-18 19:26:32 -0400
commit892c7cfc16f4379e04983f2b58cdfc35f486d269 (patch)
tree6a69d54d9f4914dfeae5e2404c1cb9d203109be4 /drivers/tty/serial/crisv10.c
parent82c3b87b7e0153c5a05ac994cd5586df41264cb6 (diff)
crisv10: use close delays from tty_port
The same as flags, convert to using close delays from tty_port. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/crisv10.c')
-rw-r--r--drivers/tty/serial/crisv10.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c
index ec2dcc726385..0e75ec331c05 100644
--- a/drivers/tty/serial/crisv10.c
+++ b/drivers/tty/serial/crisv10.c
@@ -3392,8 +3392,8 @@ get_serial_info(struct e100_serial * info,
3392 tmp.irq = info->irq; 3392 tmp.irq = info->irq;
3393 tmp.flags = info->port.flags; 3393 tmp.flags = info->port.flags;
3394 tmp.baud_base = info->baud_base; 3394 tmp.baud_base = info->baud_base;
3395 tmp.close_delay = info->close_delay; 3395 tmp.close_delay = info->port.close_delay;
3396 tmp.closing_wait = info->closing_wait; 3396 tmp.closing_wait = info->port.closing_wait;
3397 tmp.custom_divisor = info->custom_divisor; 3397 tmp.custom_divisor = info->custom_divisor;
3398 if (copy_to_user(retinfo, &tmp, sizeof(*retinfo))) 3398 if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
3399 return -EFAULT; 3399 return -EFAULT;
@@ -3415,7 +3415,7 @@ set_serial_info(struct e100_serial *info,
3415 3415
3416 if (!capable(CAP_SYS_ADMIN)) { 3416 if (!capable(CAP_SYS_ADMIN)) {
3417 if ((new_serial.type != info->type) || 3417 if ((new_serial.type != info->type) ||
3418 (new_serial.close_delay != info->close_delay) || 3418 (new_serial.close_delay != info->port.close_delay) ||
3419 ((new_serial.flags & ~ASYNC_USR_MASK) != 3419 ((new_serial.flags & ~ASYNC_USR_MASK) !=
3420 (info->port.flags & ~ASYNC_USR_MASK))) 3420 (info->port.flags & ~ASYNC_USR_MASK)))
3421 return -EPERM; 3421 return -EPERM;
@@ -3437,8 +3437,8 @@ set_serial_info(struct e100_serial *info,
3437 (new_serial.flags & ASYNC_FLAGS)); 3437 (new_serial.flags & ASYNC_FLAGS));
3438 info->custom_divisor = new_serial.custom_divisor; 3438 info->custom_divisor = new_serial.custom_divisor;
3439 info->type = new_serial.type; 3439 info->type = new_serial.type;
3440 info->close_delay = new_serial.close_delay; 3440 info->port.close_delay = new_serial.close_delay;
3441 info->closing_wait = new_serial.closing_wait; 3441 info->port.closing_wait = new_serial.closing_wait;
3442 info->port.low_latency = (info->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0; 3442 info->port.low_latency = (info->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0;
3443 3443
3444 check_and_exit: 3444 check_and_exit:
@@ -3794,8 +3794,8 @@ rs_close(struct tty_struct *tty, struct file * filp)
3794 * the line discipline to only process XON/XOFF characters. 3794 * the line discipline to only process XON/XOFF characters.
3795 */ 3795 */
3796 tty->closing = 1; 3796 tty->closing = 1;
3797 if (info->closing_wait != ASYNC_CLOSING_WAIT_NONE) 3797 if (info->port.closing_wait != ASYNC_CLOSING_WAIT_NONE)
3798 tty_wait_until_sent(tty, info->closing_wait); 3798 tty_wait_until_sent(tty, info->port.closing_wait);
3799 /* 3799 /*
3800 * At this point we stop accepting input. To do this, we 3800 * At this point we stop accepting input. To do this, we
3801 * disable the serial receiver and the DMA receive interrupt. 3801 * disable the serial receiver and the DMA receive interrupt.
@@ -3825,8 +3825,8 @@ rs_close(struct tty_struct *tty, struct file * filp)
3825 info->event = 0; 3825 info->event = 0;
3826 info->port.tty = NULL; 3826 info->port.tty = NULL;
3827 if (info->blocked_open) { 3827 if (info->blocked_open) {
3828 if (info->close_delay) 3828 if (info->port.close_delay)
3829 schedule_timeout_interruptible(info->close_delay); 3829 schedule_timeout_interruptible(info->port.close_delay);
3830 wake_up_interruptible(&info->open_wait); 3830 wake_up_interruptible(&info->open_wait);
3831 } 3831 }
3832 info->port.flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); 3832 info->port.flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
@@ -4440,8 +4440,6 @@ static int __init rs_init(void)
4440 info->forced_eop = 0; 4440 info->forced_eop = 0;
4441 info->baud_base = DEF_BAUD_BASE; 4441 info->baud_base = DEF_BAUD_BASE;
4442 info->custom_divisor = 0; 4442 info->custom_divisor = 0;
4443 info->close_delay = 5*HZ/10;
4444 info->closing_wait = 30*HZ;
4445 info->x_char = 0; 4443 info->x_char = 0;
4446 info->event = 0; 4444 info->event = 0;
4447 info->count = 0; 4445 info->count = 0;