Linux IIO development
 help / color / mirror / Atom feed
From: "Nuno Sá" <nuno.sa@analog.com>
To: <linux-iio@vger.kernel.org>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH] iio: ad5770r: make devicetree property reading consistent
Date: Wed, 11 Aug 2021 09:48:27 +0200	[thread overview]
Message-ID: <20210811074827.21889-1-nuno.sa@analog.com> (raw)

The bindings file for this driver is defining the property as 'reg' but
the driver was reading it with the 'num' name. This patches makes the
driver consistent with what is defined in the bindings.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
 drivers/iio/dac/ad5770r.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/dac/ad5770r.c b/drivers/iio/dac/ad5770r.c
index 8107f7bbbe3c..7e2fd32e993a 100644
--- a/drivers/iio/dac/ad5770r.c
+++ b/drivers/iio/dac/ad5770r.c
@@ -522,7 +522,7 @@ static int ad5770r_channel_config(struct ad5770r_state *st)
 		return -EINVAL;
 
 	device_for_each_child_node(&st->spi->dev, child) {
-		ret = fwnode_property_read_u32(child, "num", &num);
+		ret = fwnode_property_read_u32(child, "reg", &num);
 		if (ret)
 			goto err_child_out;
 		if (num >= AD5770R_MAX_CHANNELS) {
-- 
2.32.0


             reply	other threads:[~2021-08-11  7:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11  7:48 Nuno Sá [this message]
2021-08-11 16:04 ` [PATCH] iio: ad5770r: make devicetree property reading consistent Andy Shevchenko
2021-08-12  6:55   ` Sa, Nuno
     [not found]     ` <CAHp75VeZLKN0C_+PopKfYtPMqEzGLd4paSKYnrHr1B2Y1Nk9=w@mail.gmail.com>
2021-08-12  8:14       ` Sa, Nuno
2021-08-12 15:10         ` Rob Herring
2021-08-13  7:47           ` Sa, Nuno
2021-08-13  8:04             ` Andy Shevchenko
2021-08-13 10:05               ` Sa, Nuno
2021-08-14 16:04                 ` Jonathan Cameron
2021-08-16  7:54                   ` Sa, Nuno
2021-08-16  8:10                     ` Andy Shevchenko
2021-08-16  9:58                       ` Sa, Nuno
2021-08-16 12:19                     ` Rob Herring
2021-08-16 13:03                       ` Sa, Nuno

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=20210811074827.21889-1-nuno.sa@analog.com \
    --to=nuno.sa@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=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