Commit 6defec13 authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds

Char: n_r3964, use wait_event_interruptible

Signed-off-by: default avatarJiri Slaby <>
Cc: David Woodhouse <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent e0955e14
......@@ -1071,8 +1071,6 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
struct r3964_client_info *pClient;
struct r3964_message *pMsg;
struct r3964_client_message theMsg;
DECLARE_WAITQUEUE(wait, current);
int count;
......@@ -1086,16 +1084,8 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
return -EAGAIN;
/* block until there is a message: */
add_wait_queue(&pInfo->read_wait, &wait);
pMsg = remove_msg(pInfo, pClient);
if (!pMsg && !signal_pending(current)) {
goto repeat;
remove_wait_queue(&pInfo->read_wait, &wait);
(pMsg = remove_msg(pInfo, pClient)));
/* If we still haven't got a message, we must have been signalled */
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