Loading drivers/char/tty_port.c +13 −12 Original line number Diff line number Diff line Loading @@ -254,7 +254,8 @@ int tty_port_block_til_ready(struct tty_port *port, tty_port_raise_dtr_rts(port); prepare_to_wait(&port->open_wait, &wait, TASK_INTERRUPTIBLE); /* Check for a hangup or uninitialised port. Return accordingly */ /* Check for a hangup or uninitialised port. Return accordingly */ if (tty_hung_up_p(filp) || !(port->flags & ASYNC_INITIALIZED)) { if (port->flags & ASYNC_HUP_NOTIFY) retval = -EAGAIN; Loading Loading @@ -286,11 +287,11 @@ int tty_port_block_til_ready(struct tty_port *port, port->flags |= ASYNC_NORMAL_ACTIVE; spin_unlock_irqrestore(&port->lock, flags); return retval; } EXPORT_SYMBOL(tty_port_block_til_ready); int tty_port_close_start(struct tty_port *port, struct tty_struct *tty, struct file *filp) int tty_port_close_start(struct tty_port *port, struct tty_struct *tty, struct file *filp) { unsigned long flags; Loading Loading @@ -332,8 +333,8 @@ int tty_port_close_start(struct tty_port *port, struct tty_struct *tty, struct f long timeout; if (bps > 1200) timeout = max_t(long, (HZ * 10 * port->drain_delay) / bps, HZ / 10); timeout = max_t(long, (HZ * 10 * port->drain_delay) / bps, HZ / 10); else timeout = 2 * HZ; schedule_timeout_interruptible(timeout); Loading Loading
drivers/char/tty_port.c +13 −12 Original line number Diff line number Diff line Loading @@ -254,7 +254,8 @@ int tty_port_block_til_ready(struct tty_port *port, tty_port_raise_dtr_rts(port); prepare_to_wait(&port->open_wait, &wait, TASK_INTERRUPTIBLE); /* Check for a hangup or uninitialised port. Return accordingly */ /* Check for a hangup or uninitialised port. Return accordingly */ if (tty_hung_up_p(filp) || !(port->flags & ASYNC_INITIALIZED)) { if (port->flags & ASYNC_HUP_NOTIFY) retval = -EAGAIN; Loading Loading @@ -286,11 +287,11 @@ int tty_port_block_til_ready(struct tty_port *port, port->flags |= ASYNC_NORMAL_ACTIVE; spin_unlock_irqrestore(&port->lock, flags); return retval; } EXPORT_SYMBOL(tty_port_block_til_ready); int tty_port_close_start(struct tty_port *port, struct tty_struct *tty, struct file *filp) int tty_port_close_start(struct tty_port *port, struct tty_struct *tty, struct file *filp) { unsigned long flags; Loading Loading @@ -332,8 +333,8 @@ int tty_port_close_start(struct tty_port *port, struct tty_struct *tty, struct f long timeout; if (bps > 1200) timeout = max_t(long, (HZ * 10 * port->drain_delay) / bps, HZ / 10); timeout = max_t(long, (HZ * 10 * port->drain_delay) / bps, HZ / 10); else timeout = 2 * HZ; schedule_timeout_interruptible(timeout); Loading