From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>,
Andrea Merello <andrea.merello@gmail.com>,
Paresh Chaudhary <paresh.chaudhary@rockwellcollins.com>
Subject: Re: [PATCH v1 1/1] iio: temperature: max31856: Make use of device properties
Date: Sat, 16 Apr 2022 11:52:33 +0100 [thread overview]
Message-ID: <20220416115233.23625624@jic23-huawei> (raw)
In-Reply-To: <20220413185044.21588-1-andriy.shevchenko@linux.intel.com>
On Wed, 13 Apr 2022 21:50:44 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> Convert the module to be property provider agnostic and allow
> it to be used on non-OF platforms.
>
Added note on addition of mod_devicetable.h include.
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+CC Andrea and Paresh
Seems straight forward so I've applied it but there is still time for
others to take a look.
Thanks,
Jonathan
> ---
> drivers/iio/temperature/max31856.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/temperature/max31856.c b/drivers/iio/temperature/max31856.c
> index 54840881259a..8307aae2cb45 100644
> --- a/drivers/iio/temperature/max31856.c
> +++ b/drivers/iio/temperature/max31856.c
> @@ -7,9 +7,11 @@
> */
>
> #include <linux/ctype.h>
> +#include <linux/mod_devicetable.h>
> #include <linux/module.h>
> #include <linux/init.h>
> #include <linux/err.h>
> +#include <linux/property.h>
> #include <linux/spi/spi.h>
> #include <linux/iio/iio.h>
> #include <linux/iio/sysfs.h>
> @@ -422,9 +424,7 @@ static int max31856_probe(struct spi_device *spi)
> indio_dev->channels = max31856_channels;
> indio_dev->num_channels = ARRAY_SIZE(max31856_channels);
>
> - ret = of_property_read_u32(spi->dev.of_node, "thermocouple-type",
> - &data->thermocouple_type);
> -
> + ret = device_property_read_u32(&spi->dev, "thermocouple-type", &data->thermocouple_type);
> if (ret) {
> dev_info(&spi->dev,
> "Could not read thermocouple type DT property, configuring as a K-Type\n");
prev parent reply other threads:[~2022-04-16 10:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-13 18:50 [PATCH v1 1/1] iio: temperature: max31856: Make use of device properties Andy Shevchenko
2022-04-16 10:52 ` 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=20220416115233.23625624@jic23-huawei \
--to=jic23@kernel.org \
--cc=andrea.merello@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paresh.chaudhary@rockwellcollins.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