linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Ranostay <matt.ranostay@konsulko.com>
To: Vaishnav M A <vaishnav@beagleboard.org>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Alexandru Ardelean <alexandru.ardelean@analog.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	"open list:IIO SUBSYSTEM AND DRIVERS" <linux-iio@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	jkridner@beagleboard.org, drew@beagleboard.org,
	robertcnelson@beagleboard.org, rajkovic@mikroe.com
Subject: Re: [PATCH] iio: proximity: as3935 change of_property_read to device_property_read
Date: Sat, 17 Oct 2020 15:27:47 -0700	[thread overview]
Message-ID: <CAJCx=g=3YczXwHzw4+pvDwiBdx8mo8qf=ss0_KC1W3uOANr0Vw@mail.gmail.com> (raw)
In-Reply-To: <20201016184002.GA15797@ubuntu>

On Fri, Oct 16, 2020 at 11:41 AM Vaishnav M A <vaishnav@beagleboard.org> wrote:
>
>
> This patch aims to replace the of_property_read_u32 for reading
> the ams,tuning-capacitor-pf, ams,nflwdth properties with
> device_property_read_u32.
>
> Thanks and Regards,
> Vaishnav M A

Could you explain a bit more in the commit message why this is needed?

Also you pop comments that shouldn't be in the commit message below
the "---" line :)

>
> Signed-off-by: Vaishnav M A <vaishnav@beagleboard.org>
> ---
>  drivers/iio/proximity/as3935.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/proximity/as3935.c b/drivers/iio/proximity/as3935.c
> index c339e7339ec8..7e47ddf89a56 100644
> --- a/drivers/iio/proximity/as3935.c
> +++ b/drivers/iio/proximity/as3935.c
> @@ -355,7 +355,6 @@ static int as3935_probe(struct spi_device *spi)
>         struct iio_dev *indio_dev;
>         struct iio_trigger *trig;
>         struct as3935_state *st;
> -       struct device_node *np = spi->dev.of_node;
>         int ret;
>
>         /* Be sure lightning event interrupt is specified */
> @@ -374,7 +373,7 @@ static int as3935_probe(struct spi_device *spi)
>         spi_set_drvdata(spi, indio_dev);
>         mutex_init(&st->lock);
>
> -       ret = of_property_read_u32(np,
> +       ret = device_property_read_u32(&spi->dev,
>                         "ams,tuning-capacitor-pf", &st->tune_cap);
>         if (ret) {
>                 st->tune_cap = 0;
> @@ -390,7 +389,7 @@ static int as3935_probe(struct spi_device *spi)
>                 return -EINVAL;
>         }
>
> -       ret = of_property_read_u32(np,
> +       ret = device_property_read_u32(&spi->dev,
>                         "ams,nflwdth", &st->nflwdth_reg);
>         if (!ret && st->nflwdth_reg > AS3935_NFLWDTH_MASK) {
>                 dev_err(&spi->dev,
> --
> 2.25.1
>

  reply	other threads:[~2020-10-17 22:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 18:40 [PATCH] iio: proximity: as3935 change of_property_read to device_property_read Vaishnav M A
2020-10-17 22:27 ` Matt Ranostay [this message]
2020-10-18  3:42   ` Vaishnav M A

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='CAJCx=g=3YczXwHzw4+pvDwiBdx8mo8qf=ss0_KC1W3uOANr0Vw@mail.gmail.com' \
    --to=matt.ranostay@konsulko.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=drew@beagleboard.org \
    --cc=jic23@kernel.org \
    --cc=jkridner@beagleboard.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=rajkovic@mikroe.com \
    --cc=robertcnelson@beagleboard.org \
    --cc=vaishnav@beagleboard.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).