mirror of https://gitee.com/openkylin/linux.git
8cb631ccbb
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> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
ad5064.c | ||
ad5360.c | ||
ad5380.c | ||
ad5421.c | ||
ad5446.c | ||
ad5449.c | ||
ad5504.c | ||
ad5592r-base.c | ||
ad5592r-base.h | ||
ad5592r.c | ||
ad5593r.c | ||
ad5624r.h | ||
ad5624r_spi.c | ||
ad5686-spi.c | ||
ad5686.c | ||
ad5686.h | ||
ad5696-i2c.c | ||
ad5755.c | ||
ad5758.c | ||
ad5761.c | ||
ad5764.c | ||
ad5770r.c | ||
ad5791.c | ||
ad7303.c | ||
ad8801.c | ||
cio-dac.c | ||
dpot-dac.c | ||
ds4424.c | ||
lpc18xx_dac.c | ||
ltc1660.c | ||
ltc2632.c | ||
m62332.c | ||
max517.c | ||
max5821.c | ||
mcp4725.c | ||
mcp4922.c | ||
stm32-dac-core.c | ||
stm32-dac-core.h | ||
stm32-dac.c | ||
ti-dac082s085.c | ||
ti-dac5571.c | ||
ti-dac7311.c | ||
ti-dac7612.c | ||
vf610_dac.c |