Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Nuno Sá" <noname.nuno@gmail.com>
Cc: David Lechner <dlechner@baylibre.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: core: use INDIO_ALL_BUFFER_MODES in iio_buffer_enabled()
Date: Sat, 13 Jan 2024 15:26:43 +0000	[thread overview]
Message-ID: <20240113152643.242c5fd5@jic23-huawei> (raw)
In-Reply-To: <d927b0b761eb7105d2193d9dca48f2c6df8868b7.camel@gmail.com>

On Tue, 09 Jan 2024 15:07:57 +0100
Nuno Sá <noname.nuno@gmail.com> wrote:

> On Mon, 2024-01-08 at 14:06 -0600, David Lechner wrote:
> > This replaces use of individual buffer mode flags with
> > INDIO_ALL_BUFFER_MODES in the iio_buffer_enabled() function.
> > 
> > This simplifies the code and makes it robust in case of the addition of
> > new buffer modes.
> > 
> > Signed-off-by: David Lechner <dlechner@baylibre.com>
> > ---  
> 
> LGTM,
> Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Applied to the togreg branch of iio.git and pushed out as testing for all the
normal reasons.

> 
> >  drivers/iio/industrialio-core.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> > index c77745b594bd..8855d377d710 100644
> > --- a/drivers/iio/industrialio-core.c
> > +++ b/drivers/iio/industrialio-core.c
> > @@ -210,9 +210,7 @@ bool iio_buffer_enabled(struct iio_dev *indio_dev)
> >  {
> >  	struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
> >  
> > -	return iio_dev_opaque->currentmode &
> > -	       (INDIO_BUFFER_HARDWARE | INDIO_BUFFER_SOFTWARE |
> > -		INDIO_BUFFER_TRIGGERED);
> > +	return iio_dev_opaque->currentmode & INDIO_ALL_BUFFER_MODES;
> >  }
> >  EXPORT_SYMBOL_GPL(iio_buffer_enabled);
> >    
> 


      reply	other threads:[~2024-01-13 15:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-08 20:06 [PATCH] iio: core: use INDIO_ALL_BUFFER_MODES in iio_buffer_enabled() David Lechner
2024-01-09 14:07 ` Nuno Sá
2024-01-13 15:26   ` 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=20240113152643.242c5fd5@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noname.nuno@gmail.com \
    /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