The patch titled Char: genrtc, use wait_event_interruptible has been added to the -mm tree. Its filename is char-genrtc-use-wait_event_interruptible.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Char: genrtc, use wait_event_interruptible From: Jiri Slaby <jirislaby@xxxxxxxxx> genrtc, use wait_event_interruptible Signed-off-by: Jiri Slaby <jirislaby@xxxxxxxxx> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Cc: Roman Zippel <zippel@xxxxxxxxxxxxxx> Cc: David Brownell <david-b@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/char/genrtc.c | 22 +++++----------------- 1 files changed, 5 insertions(+), 17 deletions(-) diff -puN drivers/char/genrtc.c~char-genrtc-use-wait_event_interruptible drivers/char/genrtc.c --- a/drivers/char/genrtc.c~char-genrtc-use-wait_event_interruptible +++ a/drivers/char/genrtc.c @@ -173,7 +173,6 @@ static void gen_rtc_interrupt(unsigned l static ssize_t gen_rtc_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - DECLARE_WAITQUEUE(wait, current); unsigned long data; ssize_t retval; @@ -183,18 +182,10 @@ static ssize_t gen_rtc_read(struct file if (file->f_flags & O_NONBLOCK && !gen_rtc_irq_data) return -EAGAIN; - add_wait_queue(&gen_rtc_wait, &wait); - retval = -ERESTARTSYS; - - while (1) { - set_current_state(TASK_INTERRUPTIBLE); - data = xchg(&gen_rtc_irq_data, 0); - if (data) - break; - if (signal_pending(current)) - goto out; - schedule(); - } + retval = wait_event_interruptible(gen_rtc_wait, + (data = xchg(&gen_rtc_irq_data, 0))); + if (retval) + goto out; /* first test allows optimizer to nuke this case for 32-bit machines */ if (sizeof (int) != sizeof (long) && count == sizeof (unsigned int)) { @@ -206,10 +197,7 @@ static ssize_t gen_rtc_read(struct file retval = put_user(data, (unsigned long __user *)buf) ?: sizeof(unsigned long); } - out: - __set_current_state(TASK_RUNNING); - remove_wait_queue(&gen_rtc_wait, &wait); - +out: return retval; } _ Patches currently in -mm which might be from jirislaby@xxxxxxxxx are rocketc-fix-unchecked-mutex_lock_interruptible.patch char-n_hdlc-allow-restartsys-retval-of-tty-write.patch char-mxser_new-fix-sparse-warning.patch char-tty_ioctl-use-wait_event_interruptible_timeout.patch char-tty_ioctl-little-whitespace-cleanup.patch char-genrtc-use-wait_event_interruptible.patch char-n_r3964-use-wait_event_interruptible.patch char-ip2-use-msleep-for-sleeping.patch char-cyclades-add-firmware-loading.patch char-cyclades-fix-sparse-warning.patch char-isicom-cleanup-locking.patch char-isicom-del_timer-at-exit.patch char-isicom-proper-variables-types.patch char-moxa-eliminate-busy-waiting.patch char-specialix-remove-busy-waiting.patch char-riscom8-eliminate-busy-loop.patch shrink_slab-handle-bad-shrinkers.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html