linux_dsm_epyc7002/drivers/iio
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
..
accel iio: Remove superfluous of_node assignments 2020-06-14 14:20:08 +01:00
adc iio: Remove superfluous of_node assignments 2020-06-14 14:20:08 +01:00
afe iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
amplifiers iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
buffer iio: buffer: drop devm_iio_kfifo_free() API call 2020-04-19 16:56:38 +01:00
chemical iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
common iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
dac iio: Remove superfluous of_node assignments 2020-06-14 14:20:08 +01:00
dummy iio: core: pass parent device as parameter during allocation 2020-06-14 11:49:56 +01:00
frequency iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
gyro iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
health iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
humidity iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
imu iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
light iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
magnetometer iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
multiplexer iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
orientation iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
position iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
potentiometer iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
potentiostat iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
pressure iio: Remove superfluous of_node assignments 2020-06-14 14:20:08 +01:00
proximity iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
resolver iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
temperature iio: Remove superfluous of_node assignments 2020-06-14 14:20:08 +01:00
trigger iio: Remove superfluous of_node assignments 2020-06-14 14:20:08 +01:00
iio_core_trigger.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
iio_core.h iio: buffer: rename 'read_first_n' callback to 'read' 2019-12-29 15:20:09 +00:00
industrialio-buffer.c iio: buffer: remove attrcount_orig var from sysfs creation 2020-05-16 17:57:15 +01:00
industrialio-configfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
industrialio-core.c iio: core: pass parent device as parameter during allocation 2020-06-14 11:49:56 +01:00
industrialio-event.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
industrialio-sw-device.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
industrialio-sw-trigger.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
industrialio-trigger.c iio: core: drop devm_iio_trigger_free() API call 2020-04-19 16:56:37 +01:00
industrialio-triggered-event.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
inkern.c iio: inkern: drop devm_iio_channel_release{_all} API calls 2020-04-19 16:56:37 +01:00
Kconfig iio: position: Add support for Azoteq IQS624/625 angle sensors 2020-03-27 08:25:59 +00:00
Makefile iio: position: Add support for Azoteq IQS624/625 angle sensors 2020-03-27 08:25:59 +00:00
TODO iio: add a TODO 2020-03-08 17:28:53 +00:00