TTY: amiserial/simserial, use close delays from tty_port

Note that previously simserial set the delay to 0. So we preserve
that. BUT, is it correct?

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
此提交包含在:
Jiri Slaby
2012-03-05 14:52:25 +01:00
提交者 Greg Kroah-Hartman
父節點 87758791c9
當前提交 799be6ff2f
共有 3 個檔案被更改,包括 12 行新增15 行删除

查看文件

@@ -535,8 +535,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
tty_ldisc_flush(tty);
info->tport.tty = NULL;
if (info->tport.blocked_open) {
if (info->close_delay)
schedule_timeout_interruptible(info->close_delay);
if (info->tport.close_delay)
schedule_timeout_interruptible(info->tport.close_delay);
wake_up_interruptible(&info->tport.open_wait);
}
info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
@@ -829,6 +829,7 @@ simrs_init (void)
*/
for (i = 0, state = rs_table; i < NR_PORTS; i++,state++) {
tty_port_init(&state->tport);
state->tport.close_delay = 0; /* XXX really 0? */
if (state->type == PORT_UNKNOWN) continue;