summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-03-05 14:52:16 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-08 12:27:17 -0800
commitd852256389f1bcf506710ea5de77debde40013b9 (patch)
tree63235762da2d6ad860a8a281118cd53ced34736f /arch
parent979b6d89766ed573bca6a6e902193c4cad502909 (diff)
downloadlinux-3.10-d852256389f1bcf506710ea5de77debde40013b9.tar.gz
linux-3.10-d852256389f1bcf506710ea5de77debde40013b9.tar.bz2
linux-3.10-d852256389f1bcf506710ea5de77debde40013b9.zip
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')
-rw-r--r--arch/ia64/hp/sim/simserial.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index a08a53f033b..d32b759b23f 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)
}
if (--state->count < 0) {
printk(KERN_ERR "rs_close: bad serial port count for ttys%d: %d\n",
- info->line, state->count);
+ state->line, state->count);
state->count = 0;
}
if (state->count) {
@@ -572,8 +572,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
tty_ldisc_flush(tty);
info->tty = NULL;
if (info->blocked_open) {
- if (info->close_delay)
- schedule_timeout_interruptible(info->close_delay);
+ if (state->close_delay)
+ schedule_timeout_interruptible(state->close_delay);
wake_up_interruptible(&info->open_wait);
}
state->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
@@ -630,9 +630,6 @@ static int get_async_struct(int line, struct async_struct **ret_info)
}
init_waitqueue_head(&info->open_wait);
init_waitqueue_head(&info->close_wait);
- info->port = sstate->port;
- info->xmit_fifo_size = sstate->xmit_fifo_size;
- info->line = line;
info->state = sstate;
if (sstate->info) {
kfree(info);