Commit 4aeaeb0c authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman

crisv10: use *_wait from tty_port

The same as flags, convert to using *_wait queues from tty_port.
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 892c7cfc
...@@ -3827,10 +3827,10 @@ rs_close(struct tty_struct *tty, struct file * filp) ...@@ -3827,10 +3827,10 @@ rs_close(struct tty_struct *tty, struct file * filp)
if (info->blocked_open) { if (info->blocked_open) {
if (info->port.close_delay) if (info->port.close_delay)
schedule_timeout_interruptible(info->port.close_delay); schedule_timeout_interruptible(info->port.close_delay);
wake_up_interruptible(&info->open_wait); wake_up_interruptible(&info->port.open_wait);
} }
info->port.flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); info->port.flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
wake_up_interruptible(&info->close_wait); wake_up_interruptible(&info->port.close_wait);
local_irq_restore(flags); local_irq_restore(flags);
/* port closed */ /* port closed */
...@@ -3926,7 +3926,7 @@ rs_hangup(struct tty_struct *tty) ...@@ -3926,7 +3926,7 @@ rs_hangup(struct tty_struct *tty)
info->count = 0; info->count = 0;
info->port.flags &= ~ASYNC_NORMAL_ACTIVE; info->port.flags &= ~ASYNC_NORMAL_ACTIVE;
info->port.tty = NULL; info->port.tty = NULL;
wake_up_interruptible(&info->open_wait); wake_up_interruptible(&info->port.open_wait);
} }
/* /*
...@@ -3949,7 +3949,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp, ...@@ -3949,7 +3949,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
*/ */
if (tty_hung_up_p(filp) || if (tty_hung_up_p(filp) ||
(info->port.flags & ASYNC_CLOSING)) { (info->port.flags & ASYNC_CLOSING)) {
wait_event_interruptible_tty(tty, info->close_wait, wait_event_interruptible_tty(tty, info->port.close_wait,
!(info->port.flags & ASYNC_CLOSING)); !(info->port.flags & ASYNC_CLOSING));
#ifdef SERIAL_DO_RESTART #ifdef SERIAL_DO_RESTART
if (info->port.flags & ASYNC_HUP_NOTIFY) if (info->port.flags & ASYNC_HUP_NOTIFY)
...@@ -3983,7 +3983,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp, ...@@ -3983,7 +3983,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
* exit, either normal or abnormal. * exit, either normal or abnormal.
*/ */
retval = 0; retval = 0;
add_wait_queue(&info->open_wait, &wait); add_wait_queue(&info->port.open_wait, &wait);
#ifdef SERIAL_DEBUG_OPEN #ifdef SERIAL_DEBUG_OPEN
printk("block_til_ready before block: ttyS%d, count = %d\n", printk("block_til_ready before block: ttyS%d, count = %d\n",
info->line, info->count); info->line, info->count);
...@@ -4030,7 +4030,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp, ...@@ -4030,7 +4030,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
tty_lock(tty); tty_lock(tty);
} }
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
remove_wait_queue(&info->open_wait, &wait); remove_wait_queue(&info->port.open_wait, &wait);
if (extra_count) if (extra_count)
info->count++; info->count++;
info->blocked_open--; info->blocked_open--;
...@@ -4088,7 +4088,7 @@ rs_open(struct tty_struct *tty, struct file * filp) ...@@ -4088,7 +4088,7 @@ rs_open(struct tty_struct *tty, struct file * filp)
*/ */
if (tty_hung_up_p(filp) || if (tty_hung_up_p(filp) ||
(info->port.flags & ASYNC_CLOSING)) { (info->port.flags & ASYNC_CLOSING)) {
wait_event_interruptible_tty(tty, info->close_wait, wait_event_interruptible_tty(tty, info->port.close_wait,
!(info->port.flags & ASYNC_CLOSING)); !(info->port.flags & ASYNC_CLOSING));
#ifdef SERIAL_DO_RESTART #ifdef SERIAL_DO_RESTART
return ((info->port.flags & ASYNC_HUP_NOTIFY) ? return ((info->port.flags & ASYNC_HUP_NOTIFY) ?
...@@ -4445,8 +4445,6 @@ static int __init rs_init(void) ...@@ -4445,8 +4445,6 @@ static int __init rs_init(void)
info->count = 0; info->count = 0;
info->blocked_open = 0; info->blocked_open = 0;
info->normal_termios = driver->init_termios; info->normal_termios = driver->init_termios;
init_waitqueue_head(&info->open_wait);
init_waitqueue_head(&info->close_wait);
info->xmit.buf = NULL; info->xmit.buf = NULL;
info->xmit.tail = info->xmit.head = 0; info->xmit.tail = info->xmit.head = 0;
info->first_recv_buffer = info->last_recv_buffer = NULL; info->first_recv_buffer = info->last_recv_buffer = NULL;
......
...@@ -101,8 +101,6 @@ struct e100_serial { ...@@ -101,8 +101,6 @@ struct e100_serial {
struct work_struct work; struct work_struct work;
struct async_icount icount; /* error-statistics etc.*/ struct async_icount icount; /* error-statistics etc.*/
struct ktermios normal_termios; struct ktermios normal_termios;
wait_queue_head_t open_wait;
wait_queue_head_t close_wait;
unsigned long char_time_usec; /* The time for 1 char, in usecs */ unsigned long char_time_usec; /* The time for 1 char, in usecs */
unsigned long flush_time_usec; /* How often we should flush */ unsigned long flush_time_usec; /* How often we should flush */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment