From: Jonathan Cameron <jic23@kernel.org>
To: Alexandru Ardelean <ardeleanalex@gmail.com>
Cc: linux-iio <linux-iio@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>,
devicetree <devicetree@vger.kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH 1/3] iio:adc:ad7476: Fix remove handling
Date: Mon, 5 Apr 2021 16:01:12 +0100 [thread overview]
Message-ID: <20210405160112.13c55d0f@jic23-huawei> (raw)
In-Reply-To: <CA+U=DspFppB_cnufH6VLULKCaVQ796GsNykt90OJPPj_ThcyvQ@mail.gmail.com>
On Fri, 2 Apr 2021 10:34:42 +0300
Alexandru Ardelean <ardeleanalex@gmail.com> wrote:
> On Thu, Apr 1, 2021 at 8:47 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > This driver was in an odd half way state between devm based cleanup
> > and manual cleanup (most of which was missing).
> > I would guess something went wrong with a rebase or similar.
> > Anyhow, this basially finishes the job as a precusor to improving
>
> 2 typos in this commit description
One day I'll learn how to type /spell or at least to remember to use
a spell checker on commit descriptions.
>
> > the regulator handling.
> >
>
> I was pretty surprised about this patch [before reading through it].
Yup. This one definitely got a wtf followed by a groan that it had snuck
through. Has that look of a rebase going horribly wrong to me and
I missed it completely in the original reviews :(
> Anyhow:
>
> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Thanks,
Applied to the togreg branch of iio.git and marked for stable.
Bit late in cycle to do another fixes pull request so this one
can wait for the merge window.
>
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Fixes: 4bb2b8f94ace3 ("iio: adc: ad7476: implement devm_add_action_or_reset")
> > Cc: Michael Hennerich <michael.hennerich@analog.com>
> > ---
> > drivers/iio/adc/ad7476.c | 18 ++++--------------
> > 1 file changed, 4 insertions(+), 14 deletions(-)
> >
> > diff --git a/drivers/iio/adc/ad7476.c b/drivers/iio/adc/ad7476.c
> > index 17402714b387..9e9ff07cf972 100644
> > --- a/drivers/iio/adc/ad7476.c
> > +++ b/drivers/iio/adc/ad7476.c
> > @@ -321,25 +321,15 @@ static int ad7476_probe(struct spi_device *spi)
> > spi_message_init(&st->msg);
> > spi_message_add_tail(&st->xfer, &st->msg);
> >
> > - ret = iio_triggered_buffer_setup(indio_dev, NULL,
> > - &ad7476_trigger_handler, NULL);
> > + ret = devm_iio_triggered_buffer_setup(&spi->dev, indio_dev, NULL,
> > + &ad7476_trigger_handler, NULL);
> > if (ret)
> > - goto error_disable_reg;
> > + return ret;
> >
> > if (st->chip_info->reset)
> > st->chip_info->reset(st);
> >
> > - ret = iio_device_register(indio_dev);
> > - if (ret)
> > - goto error_ring_unregister;
> > - return 0;
> > -
> > -error_ring_unregister:
> > - iio_triggered_buffer_cleanup(indio_dev);
> > -error_disable_reg:
> > - regulator_disable(st->reg);
> > -
> > - return ret;
> > + return devm_iio_device_register(&spi->dev, indio_dev);
> > }
> >
> > static const struct spi_device_id ad7476_id[] = {
> > --
> > 2.31.1
> >
next prev parent reply other threads:[~2021-04-05 15:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 17:17 [PATCH 0/3] iio:adc:ad7476: Fix, regulator support and binding doc Jonathan Cameron
2021-04-01 17:17 ` [PATCH 1/3] iio:adc:ad7476: Fix remove handling Jonathan Cameron
2021-04-02 7:34 ` Alexandru Ardelean
2021-04-05 15:01 ` Jonathan Cameron [this message]
2021-04-01 17:17 ` [PATCH 2/3] iio:adc:ad7476: Handle the different regulators used by various parts Jonathan Cameron
2021-04-02 8:35 ` Lars-Peter Clausen
2021-04-05 16:02 ` Jonathan Cameron
2021-04-01 17:17 ` [PATCH 3/3] dt-bindings:iio:adc:adi,ad7474: Add missing binding document 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=20210405160112.13c55d0f@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=Michael.Hennerich@analog.com \
--cc=ardeleanalex@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=robh+dt@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).