Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andy Shevchenko and committed by
Jonathan Cameron
615b5e19 06f90dd4

+3 -1
+3 -1
drivers/iio/temperature/max31865.c
··· 12 12 #include <linux/delay.h> 13 13 #include <linux/err.h> 14 14 #include <linux/init.h> 15 + #include <linux/mod_devicetable.h> 15 16 #include <linux/module.h> 16 17 #include <linux/iio/iio.h> 17 18 #include <linux/iio/sysfs.h> 19 + #include <linux/property.h> 18 20 #include <linux/spi/spi.h> 19 21 #include <asm/unaligned.h> 20 22 ··· 307 305 indio_dev->channels = max31865_channels; 308 306 indio_dev->num_channels = ARRAY_SIZE(max31865_channels); 309 307 310 - if (of_property_read_bool(spi->dev.of_node, "maxim,3-wire")) { 308 + if (device_property_read_bool(&spi->dev, "maxim,3-wire")) { 311 309 /* select 3 wire */ 312 310 data->three_wire = 1; 313 311 } else {