Skip to contentSkip to conversation

Char: tty, fix tty_port_block_til_ready waiting

PATCH Superseded Jiri Slaby 2 participants 3 messages Jun 16, 2009 – Jun 17, 2009 Char and misc drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 Char: tty, fix tty_port_block_til_ready waiting

Use DEFINE_WAIT instead of DECLARE_WAITQUEUE, because we use prepare/finish_wait since commit 3e3b5c087799e536871c8261b05bc28e4783c8da
(tty: use prepare/finish_wait)

Otherwise we would oops in finish_wait.

---
 drivers/char/tty_port.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/tty_port.c +1 -1
index 62dadfc..a8ed648 100644
@@ -193,7 +193,7 @@ int tty_port_block_til_ready(struct tty_port *port,
 {
 	int do_clocal = 0, retval;
 	unsigned long flags;
-	DECLARE_WAITQUEUE(wait, current);
+	DEFINE_WAIT(wait, current);
 	int cd;
 
 	/* block if port is in the process of being closed */
Signature · 1 line
1.6.3.2
#1 lore raw
Quoted 17 lines · On Tue, 16 Jun 2009 21:13:00 +0200 Jiri Slaby <[email protected]> wrote:

Use DEFINE_WAIT instead of DECLARE_WAITQUEUE, because we use prepare/finish_wait since commit 3e3b5c087799e536871c8261b05bc28e4783c8da
(tty: use prepare/finish_wait)

Otherwise we would oops in finish_wait.

---
 drivers/char/tty_port.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/tty_port.c +0 -0
index 62dadfc..a8ed648 100644

drivers/char/tty_port.c int tty_port_block_til_ready(struct tty_port *port, · line 196

Quoted 5 lines
drivers/char/tty_port.c +1 -1
@@ -193,7 +193,7 @@ int tty_port_block_til_ready(struct tty_port *port,
 {
 	int do_clocal = 0, retval;
 	unsigned long flags;
-	DECLARE_WAITQUEUE(wait, current);
+	DEFINE_WAIT(wait, current);

That won't compile. DEFINE_WAIT(wait) will though.

author
#2 lore raw
Quoted 10 lines · Andrew Morton

drivers/char/tty_port.c int tty_port_block_til_ready(struct tty_port *port, · line 196

Quoted 8 lines
drivers/char/tty_port.c +1 -1
@@ -193,7 +193,7 @@ int tty_port_block_til_ready(struct tty_port *port,
 {
 	int do_clocal = 0, retval;
 	unsigned long flags;
-	DECLARE_WAITQUEUE(wait, current);
+	DEFINE_WAIT(wait, current);

That won't compile. DEFINE_WAIT(wait) will though.

Ah, crap. One should teach himself using commit --amend.

Sorry.