From: Andy Shevchenko Date: Wed, 13 Apr 2022 18:53:35 +0000 (+0300) Subject: iio: temperature: max31865: Make use of device properties X-Git-Tag: v6.1-rc5~1160^2~81^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=615b5e199af1c39b19c8029149c2b0fa5659d028;p=platform%2Fkernel%2Flinux-starfive.git iio: temperature: max31865: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Add mod_devicetable.h include. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220413185335.21743-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/temperature/max31865.c b/drivers/iio/temperature/max31865.c index 86c3f35..e3bb781 100644 --- a/drivers/iio/temperature/max31865.c +++ b/drivers/iio/temperature/max31865.c @@ -12,9 +12,11 @@ #include #include #include +#include #include #include #include +#include #include #include @@ -305,7 +307,7 @@ static int max31865_probe(struct spi_device *spi) indio_dev->channels = max31865_channels; indio_dev->num_channels = ARRAY_SIZE(max31865_channels); - if (of_property_read_bool(spi->dev.of_node, "maxim,3-wire")) { + if (device_property_read_bool(&spi->dev, "maxim,3-wire")) { /* select 3 wire */ data->three_wire = 1; } else {