staging: iio: adc: add missing of_node references to iio_dev
Subsystems (4)
PATCH v2 1/1 staging: iio: adc: add missing of_node references to iio_dev
Adding missing indio_dev->dev.of_node references to allow iio consumers to access the device channels.
---
v2: Wrong from mail ID in first version of patch
--- drivers/staging/iio/adc/ad7192.c | 1 - drivers/staging/iio/adc/ad7780.c | 1 - 2 files changed, 2 deletions(-)
drivers/staging/iio/adc/ad7192.c +0 -1
@@ -668,7 +668,6 @@ static int ad7192_probe(struct spi_device *spi)spi_set_drvdata (spi, indio_dev); st->devid =spi_get_device_id (spi)->driver_data; indio_dev->dev.parent = &spi->dev; - indio_dev->dev.of_node = spi->dev.of_node; indio_dev->name =spi_get_device_id (spi)->name; indio_dev->modes =INDIO_DIRECT_MODE ;
drivers/staging/iio/adc/ad7780.c +0 -1
@@ -195,7 +195,6 @@ static int ad7780_probe(struct spi_device *spi)spi_set_drvdata (spi, indio_dev); indio_dev->dev.parent = &spi->dev; - indio_dev->dev.of_node = spi->dev.of_node; indio_dev->name =spi_get_device_id (spi)->name; indio_dev->modes =INDIO_DIRECT_MODE ; indio_dev->channels = &st->chip_info->channel;
Signature · 1 line
2.10.0.GIT
Hi,
The patch seems to be reverted?
Also should this part in the IIO core take care of automatically setting the of_node of the IIO device? As far as I can see we don't have to initialize it manually.
/* If the calling driver did not initialize of_node, do it here */
if (!indio_dev->dev.of_node && indio_dev->dev.parent)
indio_dev->dev.of_node = indio_dev->dev.parent->of_node;- Lars
Quoted 36 lines · Hari Prasath
Adding missing
indio_dev->dev.of_nodereferences to allow iio consumers to access the device channels.Signed-off-by Hari Prasath <[email protected]>---
v2: Wrong from mail ID in first version of patch--- drivers/staging/iio/adc/ad7192.c | 1 - drivers/staging/iio/adc/ad7780.c | 1 - 2 files changed, 2 deletions(-)drivers/staging/iio/adc/ad7192.c +0
-1@@ -668,7 +668,6 @@ static int ad7192_probe(struct spi_device *spi)spi_set_drvdata (spi, indio_dev); st->devid =spi_get_device_id (spi)->driver_data; indio_dev->dev.parent = &spi->dev; - indio_dev->dev.of_node = spi->dev.of_node; indio_dev->name =spi_get_device_id (spi)->name; indio_dev->modes =INDIO_DIRECT_MODE ;drivers/staging/iio/adc/ad7780.c +0
-1@@ -195,7 +195,6 @@ static int ad7780_probe(struct spi_device *spi)spi_set_drvdata (spi, indio_dev); indio_dev->dev.parent = &spi->dev; - indio_dev->dev.of_node = spi->dev.of_node; indio_dev->name =spi_get_device_id (spi)->name; indio_dev->modes =INDIO_DIRECT_MODE ; indio_dev->channels = &st->chip_info->channel;
Hi,
I agree that it's initialized in the core IIO driver. Also I have screwed up the patch.
Regards,
Hari
Quoted 52 lines · Lars-Peter Clausen
Hi,
The patch seems to be reverted?
Also should this part in the IIO core take care of automatically setting the
of_nodeof the IIO device? As far as I can see we don't have to initialize it manually./* If the calling driver did not initialize of_node, do it here */ if (!indio_dev->dev.of_node && indio_dev->dev.parent) indio_dev->dev.of_node = indio_dev->dev.parent->of_node;- Lars
Quoted 36 lines · Hari Prasath
Adding missing
indio_dev->dev.of_nodereferences to allow iio consumers to access the device channels.Signed-off-by Hari Prasath <[email protected]>---
v2: Wrong from mail ID in first version of patch--- drivers/staging/iio/adc/ad7192.c | 1 - drivers/staging/iio/adc/ad7780.c | 1 - 2 files changed, 2 deletions(-)drivers/staging/iio/adc/ad7192.c +0
-1@@ -668,7 +668,6 @@ static int ad7192_probe(struct spi_device *spi)spi_set_drvdata (spi, indio_dev); st->devid =spi_get_device_id (spi)->driver_data; indio_dev->dev.parent = &spi->dev; - indio_dev->dev.of_node = spi->dev.of_node; indio_dev->name =spi_get_device_id (spi)->name; indio_dev->modes =INDIO_DIRECT_MODE ;drivers/staging/iio/adc/ad7780.c +0
-1@@ -195,7 +195,6 @@ static int ad7780_probe(struct spi_device *spi)spi_set_drvdata (spi, indio_dev); indio_dev->dev.parent = &spi->dev; - indio_dev->dev.of_node = spi->dev.of_node; indio_dev->name =spi_get_device_id (spi)->name; indio_dev->modes =INDIO_DIRECT_MODE ; indio_dev->channels = &st->chip_info->channel;
Signature · 2 lines
Regards, G.E.Hari Prasath