Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6defec139a0fb0fb36c41a441f8417360da81ea1
Commit:     6defec139a0fb0fb36c41a441f8417360da81ea1
Parent:     e0955e14f72dd1f561dc8b7c4434a253914ddfd4
Author:     Jiri Slaby <[EMAIL PROTECTED]>
AuthorDate: Sun Jul 15 23:40:20 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Jul 16 09:05:44 2007 -0700

    Char: n_r3964, use wait_event_interruptible
    
    Signed-off-by: Jiri Slaby <[EMAIL PROTECTED]>
    Cc: David Woodhouse <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/char/n_r3964.c |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/char/n_r3964.c b/drivers/char/n_r3964.c
index 14557a4..6b918b8 100644
--- a/drivers/char/n_r3964.c
+++ b/drivers/char/n_r3964.c
@@ -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;
 
        TRACE_L("read()");
@@ -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);
-repeat:
-                       __set_current_state(TASK_INTERRUPTIBLE);
-                       pMsg = remove_msg(pInfo, pClient);
-                       if (!pMsg && !signal_pending(current)) {
-                               schedule();
-                               goto repeat;
-                       }
-                       __set_current_state(TASK_RUNNING);
-                       remove_wait_queue(&pInfo->read_wait, &wait);
+                       wait_event_interruptible(pInfo->read_wait,
+                                       (pMsg = remove_msg(pInfo, pClient)));
                }
 
                /* If we still haven't got a message, we must have been 
signalled */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to