diff options
author | Andy Shevchenko | 2022-04-13 21:53:35 +0300 |
---|---|---|
committer | Jonathan Cameron | 2022-04-28 19:30:19 +0100 |
commit | 615b5e199af1c39b19c8029149c2b0fa5659d028 (patch) | |
tree | c00634858f7ab17ada3c7bc201ff758a9f0710cd /drivers/iio/temperature | |
parent | 06f90dd4922484b0f913415842cadf4bbbfcb383 (diff) |
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 <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220413185335.21743-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/temperature')
-rw-r--r-- | drivers/iio/temperature/max31865.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iio/temperature/max31865.c b/drivers/iio/temperature/max31865.c index 86c3f3509a26..e3bb78184c6e 100644 --- a/drivers/iio/temperature/max31865.c +++ b/drivers/iio/temperature/max31865.c @@ -12,9 +12,11 @@ #include <linux/delay.h> #include <linux/err.h> #include <linux/init.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/iio/iio.h> #include <linux/iio/sysfs.h> +#include <linux/property.h> #include <linux/spi/spi.h> #include <asm/unaligned.h> @@ -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 { |