diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-03-05 08:52:16 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-08 15:27:17 -0500 |
commit | d852256389f1bcf506710ea5de77debde40013b9 (patch) | |
tree | 63235762da2d6ad860a8a281118cd53ced34736f /arch/ia64/hp | |
parent | 979b6d89766ed573bca6a6e902193c4cad502909 (diff) |
TTY: simserial/amiserial, use one instance of other members
This means:
* close_delay
* closing_wait
* line
* port
* xmit_fifo_size
This actually fixes a bug in amiserial. It initializes one and uses
the other of the close delays. Yes, duplicating structure members is
evil.
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>
Diffstat (limited to 'arch/ia64/hp')
-rw-r--r-- | arch/ia64/hp/sim/simserial.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index a08a53f033b4..d32b759b23f1 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
@@ -553,7 +553,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp) | |||
553 | } | 553 | } |
554 | if (--state->count < 0) { | 554 | if (--state->count < 0) { |
555 | printk(KERN_ERR "rs_close: bad serial port count for ttys%d: %d\n", | 555 | printk(KERN_ERR "rs_close: bad serial port count for ttys%d: %d\n", |
556 | info->line, state->count); | 556 | state->line, state->count); |
557 | state->count = 0; | 557 | state->count = 0; |
558 | } | 558 | } |
559 | if (state->count) { | 559 | if (state->count) { |
@@ -572,8 +572,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp) | |||
572 | tty_ldisc_flush(tty); | 572 | tty_ldisc_flush(tty); |
573 | info->tty = NULL; | 573 | info->tty = NULL; |
574 | if (info->blocked_open) { | 574 | if (info->blocked_open) { |
575 | if (info->close_delay) | 575 | if (state->close_delay) |
576 | schedule_timeout_interruptible(info->close_delay); | 576 | schedule_timeout_interruptible(state->close_delay); |
577 | wake_up_interruptible(&info->open_wait); | 577 | wake_up_interruptible(&info->open_wait); |
578 | } | 578 | } |
579 | state->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); | 579 | state->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); |
@@ -630,9 +630,6 @@ static int get_async_struct(int line, struct async_struct **ret_info) | |||
630 | } | 630 | } |
631 | init_waitqueue_head(&info->open_wait); | 631 | init_waitqueue_head(&info->open_wait); |
632 | init_waitqueue_head(&info->close_wait); | 632 | init_waitqueue_head(&info->close_wait); |
633 | info->port = sstate->port; | ||
634 | info->xmit_fifo_size = sstate->xmit_fifo_size; | ||
635 | info->line = line; | ||
636 | info->state = sstate; | 633 | info->state = sstate; |
637 | if (sstate->info) { | 634 | if (sstate->info) { |
638 | kfree(info); | 635 | kfree(info); |