linux_dsm_epyc7002/drivers/iio/temperature
Lars-Peter Clausen 8cb631ccbb iio: Remove superfluous of_node assignments
If a driver does not assign an of_node to a IIO device to IIO core will
automatically assign the of_node of the parent device. This automatic
assignment is done in the iio_device_register() function.

There is a fair amount of drivers that currently manually assign the
of_node of the IIO device. All but 4 of them can make use of the automatic
assignment though.

The exceptions are:
 * mxs-lradc-adc: Which uses the of_node of the parent of the parent.
 * stm32-dfsdm-adc, stm32-adc and stm32-dac: Which reference the of_node
   assigned to the IIO device before iio_device_register() is called.

All other drivers are updated to use automatic assignment. This reduces
the amount of boilerplate code involved in setting up the IIO device.

The patch has mostly been auto-generated with the following semantic patch

// <smpl>
@exists@
expression indio_dev;
expression parent;
@@
indio_dev = \(devm_iio_device_alloc\|iio_device_alloc\)(&parent, ...)
...
-indio_dev->dev.of_node = parent.of_node;

@exists@
expression indio_dev;
expression parent;
@@
indio_dev = \(devm_iio_device_alloc\|iio_device_alloc\)(parent, ...)
...
-indio_dev->dev.of_node = parent->of_node;
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-06-14 14:20:08 +01:00
..
hid-sensor-temperature.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
iqs620at-temp.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
Kconfig iio: temperature: Add support for Azoteq IQS620AT temperature sensor 2020-03-27 08:25:50 +00:00
ltc2983.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
Makefile iio: temperature: Add support for Azoteq IQS620AT temperature sensor 2020-03-27 08:25:50 +00:00
max31856.c iio: Remove superfluous of_node assignments 2020-06-14 14:20:08 +01:00
maxim_thermocouple.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
mlx90614.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
mlx90632.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
tmp006.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
tmp007.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
tsys01.c iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
tsys02d.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00