All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Matt Ranostay <matt.ranostay@konsulko.com>
Cc: Alexandru Ardelean <alexandru.ardelean@analog.com>,
	"open list:IIO SUBSYSTEM AND DRIVERS" <linux-iio@vger.kernel.org>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Hartmut Knaack <knaack.h@gmx.de>
Subject: Re: [PATCH] iio: chemical: atlas-ph-sensor: fix iio_triggered_buffer_predisable() position
Date: Sun, 6 Oct 2019 10:27:27 +0100	[thread overview]
Message-ID: <20191006102727.6945a271@archlinux> (raw)
In-Reply-To: <CAJCx=g=y9xDHHZ06wjGNRVG0hLVSsWQZJJcPVTtAxmYVW8dwxw@mail.gmail.com>

On Sat, 5 Oct 2019 18:56:48 -0700
Matt Ranostay <matt.ranostay@konsulko.com> wrote:

> On Fri, Sep 20, 2019 at 12:31 AM Alexandru Ardelean
> <alexandru.ardelean@analog.com> wrote:
> >
> > The iio_triggered_buffer_{predisable,postenable} functions attach/detach
> > the poll functions.
> >
> > The iio_triggered_buffer_predisable() should be called last, to detach the
> > poll func after the devices has been suspended.
> >
> > The position of iio_triggered_buffer_postenable() is correct.
> >
> > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>  
> 
> Sorry didn't notice this till now. Looks good to me.
> 
> Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.

Thanks,

Jonathan

> 
> > ---
> >  drivers/iio/chemical/atlas-ph-sensor.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c
> > index 3a20cb5d9bff..6c175eb1c7a7 100644
> > --- a/drivers/iio/chemical/atlas-ph-sensor.c
> > +++ b/drivers/iio/chemical/atlas-ph-sensor.c
> > @@ -323,16 +323,16 @@ static int atlas_buffer_predisable(struct iio_dev *indio_dev)
> >         struct atlas_data *data = iio_priv(indio_dev);
> >         int ret;
> >
> > -       ret = iio_triggered_buffer_predisable(indio_dev);
> > +       ret = atlas_set_interrupt(data, false);
> >         if (ret)
> >                 return ret;
> >
> > -       ret = atlas_set_interrupt(data, false);
> > +       pm_runtime_mark_last_busy(&data->client->dev);
> > +       ret = pm_runtime_put_autosuspend(&data->client->dev);
> >         if (ret)
> >                 return ret;
> >
> > -       pm_runtime_mark_last_busy(&data->client->dev);
> > -       return pm_runtime_put_autosuspend(&data->client->dev);
> > +       return iio_triggered_buffer_predisable(indio_dev);
> >  }
> >
> >  static const struct iio_trigger_ops atlas_interrupt_trigger_ops = {
> > --
> > 2.20.1
> >  


  reply	other threads:[~2019-10-06  9:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20  7:31 [PATCH] iio: chemical: atlas-ph-sensor: fix iio_triggered_buffer_predisable() position Alexandru Ardelean
2019-09-20  7:37 ` Ardelean, Alexandru
2019-10-05 15:12   ` Jonathan Cameron
2019-10-06  1:56 ` Matt Ranostay
2019-10-06  9:27   ` Jonathan Cameron [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-07-05 13:43 Alexandru Ardelean
2019-07-07 12:01 ` Jonathan Cameron
2019-08-11  9:28   ` Jonathan Cameron

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=20191006102727.6945a271@archlinux \
    --to=jic23@kernel.org \
    --cc=alexandru.ardelean@analog.com \
    --cc=knaack.h@gmx.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=matt.ranostay@konsulko.com \
    --cc=pmeerw@pmeerw.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.