summaryrefslogtreecommitdiffstats
path: root/arch/ia64/hp/sim
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-03-05 14:52:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-08 21:48:27 +0100
commit37343030458c0eea3f1093b09fc604d4f300eac7 (patch)
tree9175790ba72b6061c6c8a277285c663f4c3b44c7 /arch/ia64/hp/sim
parentTTY: simserial, remove some tty ops (diff)
downloadlinux-37343030458c0eea3f1093b09fc604d4f300eac7.tar.xz
linux-37343030458c0eea3f1093b09fc604d4f300eac7.zip
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/sim')
-rw-r--r--arch/ia64/hp/sim/simserial.c13
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)
rs_flush_buffer(tty);
tty_ldisc_flush(tty);
port->tty = NULL;
- if (port->blocked_open) {
- if (port->close_delay)
- schedule_timeout_interruptible(port->close_delay);
- wake_up_interruptible(&port->open_wait);
- }
- port->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
- wake_up_interruptible(&port->close_wait);
+
+ tty_port_close_end(port, tty);
}
/*
@@ -706,6 +701,9 @@ static const struct tty_operations hp_ops = {
.proc_fops = &rs_proc_fops,
};
+static const struct tty_port_operations hp_port_ops = {
+};
+
/*
* The serial driver boot-time initialization code!
*/
@@ -742,6 +740,7 @@ static int __init simrs_init(void)
*/
state = rs_table;
tty_port_init(&state->port);
+ state->port.ops = &hp_port_ops;
state->port.close_delay = 0; /* XXX really 0? */
retval = hpsim_get_irq(KEYBOARD_INTR);