Linux-IIO Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] iio: max31856: add missing of_node and parent references to iio_dev
@ 2019-09-09 12:58 Andrea Merello
  2019-09-15 12:27 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Andrea Merello @ 2019-09-09 12:58 UTC (permalink / raw)
  To: paresh.chaudhary, patrick.havelange, pmeerw, lars, knaack.h, jic23
  Cc: linux-iio, Andrea Merello

Adding missing indio_dev->dev.of_node references so that, in case multiple
max31856 are present, users can get some clues to being able to distinguish
each of them. While at it, add also the missing parent reference.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>

diff --git a/drivers/iio/temperature/max31856.c b/drivers/iio/temperature/max31856.c
index f184ba5601d9..73ed550e3fc9 100644
--- a/drivers/iio/temperature/max31856.c
+++ b/drivers/iio/temperature/max31856.c
@@ -284,6 +284,8 @@ static int max31856_probe(struct spi_device *spi)
 	spi_set_drvdata(spi, indio_dev);
 
 	indio_dev->info = &max31856_info;
+	indio_dev->dev.parent = &spi->dev;
+	indio_dev->dev.of_node = spi->dev.of_node;
 	indio_dev->name = id->name;
 	indio_dev->modes = INDIO_DIRECT_MODE;
 	indio_dev->channels = max31856_channels;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] iio: max31856: add missing of_node and parent references to iio_dev
  2019-09-09 12:58 [PATCH] iio: max31856: add missing of_node and parent references to iio_dev Andrea Merello
@ 2019-09-15 12:27 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2019-09-15 12:27 UTC (permalink / raw)
  To: Andrea Merello
  Cc: paresh.chaudhary, patrick.havelange, pmeerw, lars, knaack.h, linux-iio

On Mon,  9 Sep 2019 14:58:17 +0200
Andrea Merello <andrea.merello@gmail.com> wrote:

> Adding missing indio_dev->dev.of_node references so that, in case multiple
> max31856 are present, users can get some clues to being able to distinguish
> each of them. While at it, add also the missing parent reference.
> 
> Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.

Thanks,

Jonathan

> 
> diff --git a/drivers/iio/temperature/max31856.c b/drivers/iio/temperature/max31856.c
> index f184ba5601d9..73ed550e3fc9 100644
> --- a/drivers/iio/temperature/max31856.c
> +++ b/drivers/iio/temperature/max31856.c
> @@ -284,6 +284,8 @@ static int max31856_probe(struct spi_device *spi)
>  	spi_set_drvdata(spi, indio_dev);
>  
>  	indio_dev->info = &max31856_info;
> +	indio_dev->dev.parent = &spi->dev;
> +	indio_dev->dev.of_node = spi->dev.of_node;
>  	indio_dev->name = id->name;
>  	indio_dev->modes = INDIO_DIRECT_MODE;
>  	indio_dev->channels = max31856_channels;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-09 12:58 [PATCH] iio: max31856: add missing of_node and parent references to iio_dev Andrea Merello
2019-09-15 12:27 ` Jonathan Cameron

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org linux-iio@archiver.kernel.org
	public-inbox-index linux-iio


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/ public-inbox