From d852256389f1bcf506710ea5de77debde40013b9 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 5 Mar 2012 14:52:16 +0100 Subject: 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 Cc: Geert Uytterhoeven Cc: Tony Luck Cc: Fenghua Yu Signed-off-by: Greg Kroah-Hartman --- arch/ia64/hp/sim/simserial.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'arch/ia64') 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); -- cgit v1.2.3