aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tty_port.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-06-24 13:35:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-24 12:55:50 -0400
commit6af9a43d58f2ec455b752fb9534cf05c7e855dbe (patch)
tree43fbe1b0823392eda912b76bc3f180e651f47d6c /drivers/char/tty_port.c
parent24ed3abaa13a9499d7454a1ed9830bb53b689b94 (diff)
tty: fix tty_port_block_til_ready waiting
Since commit 3e3b5c087799e536871c8261b05bc28e4783c8da ("tty: use prepare/finish_wait"), tty_port_block_til_ready() is using prepare_to_wait()/finish_wait(). Those functions require that the wait_queue_t be initialised with .func=autoremove_wake_function, via DEFINE_WAIT(). But the conversion from DECLARE_WAITQUEUE() to DEFINE_WAIT() was not made, so this code will oops in finish_wait(). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/tty_port.c')
-rw-r--r--drivers/char/tty_port.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c
index 62dadfc95e34..4e862a75f7ff 100644
--- a/drivers/char/tty_port.c
+++ b/drivers/char/tty_port.c
@@ -193,7 +193,7 @@ int tty_port_block_til_ready(struct tty_port *port,
193{ 193{
194 int do_clocal = 0, retval; 194 int do_clocal = 0, retval;
195 unsigned long flags; 195 unsigned long flags;
196 DECLARE_WAITQUEUE(wait, current); 196 DEFINE_WAIT(wait);
197 int cd; 197 int cd;
198 198
199 /* block if port is in the process of being closed */ 199 /* block if port is in the process of being closed */