linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio:kfifo_buf: Use wake_up_interruptible_poll()
Date: Sun, 15 Sep 2013 17:39:29 +0100	[thread overview]
Message-ID: <5235E2C1.6020606@kernel.org> (raw)
In-Reply-To: <1379259094-22577-1-git-send-email-lars@metafoo.de>

On 09/15/13 16:31, Lars-Peter Clausen wrote:
> 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>
You learn something new every day (or several things today!)...

Applied to the togreg branch of iio.git

Thanks,

Jonathan
> ---
>  drivers/iio/kfifo_buf.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/kfifo_buf.c b/drivers/iio/kfifo_buf.c
> index a923c78..1bea41b 100644
> --- a/drivers/iio/kfifo_buf.c
> +++ b/drivers/iio/kfifo_buf.c
> @@ -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;
>  }
> 

      reply	other threads:[~2013-09-15 15:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-15 15:31 [PATCH] iio:kfifo_buf: Use wake_up_interruptible_poll() Lars-Peter Clausen
2013-09-15 16:39 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5235E2C1.6020606@kernel.org \
    --to=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).