diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-03-05 08:52:34 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-08 15:48:27 -0500 |
commit | 37343030458c0eea3f1093b09fc604d4f300eac7 (patch) | |
tree | 9175790ba72b6061c6c8a277285c663f4c3b44c7 /arch/ia64/hp | |
parent | 2fcd5caf6d9dbf274ac7ef277f1cc541f1be9784 (diff) |
TTY: simserial, use tty_port_close_end
The code is identical except locking. But added locks to protect
counts do not hurt here. Rather the contrary.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/ia64/hp')
-rw-r--r-- | arch/ia64/hp/sim/simserial.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index d173dba306df..53db99af43a2 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
@@ -478,13 +478,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp) | |||
478 | rs_flush_buffer(tty); | 478 | rs_flush_buffer(tty); |
479 | tty_ldisc_flush(tty); | 479 | tty_ldisc_flush(tty); |
480 | port->tty = NULL; | 480 | port->tty = NULL; |
481 | if (port->blocked_open) { | 481 | |
482 | if (port->close_delay) | 482 | tty_port_close_end(port, tty); |
483 | schedule_timeout_interruptible(port->close_delay); | ||
484 | wake_up_interruptible(&port->open_wait); | ||
485 | } | ||
486 | port->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); | ||
487 | wake_up_interruptible(&port->close_wait); | ||
488 | } | 483 | } |
489 | 484 | ||
490 | /* | 485 | /* |
@@ -706,6 +701,9 @@ static const struct tty_operations hp_ops = { | |||
706 | .proc_fops = &rs_proc_fops, | 701 | .proc_fops = &rs_proc_fops, |
707 | }; | 702 | }; |
708 | 703 | ||
704 | static const struct tty_port_operations hp_port_ops = { | ||
705 | }; | ||
706 | |||
709 | /* | 707 | /* |
710 | * The serial driver boot-time initialization code! | 708 | * The serial driver boot-time initialization code! |
711 | */ | 709 | */ |
@@ -742,6 +740,7 @@ static int __init simrs_init(void) | |||
742 | */ | 740 | */ |
743 | state = rs_table; | 741 | state = rs_table; |
744 | tty_port_init(&state->port); | 742 | tty_port_init(&state->port); |
743 | state->port.ops = &hp_port_ops; | ||
745 | state->port.close_delay = 0; /* XXX really 0? */ | 744 | state->port.close_delay = 0; /* XXX really 0? */ |
746 | 745 | ||
747 | retval = hpsim_get_irq(KEYBOARD_INTR); | 746 | retval = hpsim_get_irq(KEYBOARD_INTR); |