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>
This commit is contained in:

committed by
Greg Kroah-Hartman

父節點
979b6d8976
當前提交
d852256389
@@ -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);
|
||||
|
Reference in New Issue
Block a user