iio:kfifo_buf: Use wake_up_interruptible_poll()
authorLars-Peter Clausen <lars@metafoo.de>
Sun, 15 Sep 2013 15:31:00 +0000 (16:31 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 15 Sep 2013 16:39:04 +0000 (17:39 +0100)
Use wake_up_interruptible_poll() instead of wake_up_interruptible() to only wake
up those threads that listen for input poll notifications.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/kfifo_buf.c

index a923c78d5cb48f40b2b661933b329f4ddb420c64..1bea41bcbdc611ec4dd87c2625c4d8470cb131ec 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/mutex.h>
 #include <linux/iio/kfifo_buf.h>
 #include <linux/sched.h>
+#include <linux/poll.h>
 
 struct iio_kfifo {
        struct iio_buffer buffer;
@@ -102,7 +103,7 @@ static int iio_store_to_kfifo(struct iio_buffer *r,
        if (ret != 1)
                return -EBUSY;
        r->stufftoread = true;
-       wake_up_interruptible(&r->pollq);
+       wake_up_interruptible_poll(&r->pollq, POLLIN | POLLRDNORM);
 
        return 0;
 }