Linux-IIO Archive on lore.kernel.org
 help / Atom feed
* [PATCH 2/2] iio: dac: ds4422/ds4424 fix chip verification
@ 2019-05-05 19:24 Ruslan Babayev
  2019-05-11 11:49 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Ruslan Babayev @ 2019-05-05 19:24 UTC (permalink / raw)
  To: Andrew Morton
  Cc: xe-linux-external, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler, linux-iio,
	linux-kernel

The ds4424_get_value function takes channel number as it's 3rd
argument and translates it internally into I2C address using
DS4424_DAC_ADDR macro. The caller ds4424_verify_chip was passing an
already translated I2C address as its last argument.

Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
Cc: xe-linux-external@cisco.com
---
 drivers/iio/dac/ds4424.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/dac/ds4424.c b/drivers/iio/dac/ds4424.c
index 2b3ba1a66fe8..ae9be792693b 100644
--- a/drivers/iio/dac/ds4424.c
+++ b/drivers/iio/dac/ds4424.c
@@ -166,7 +166,7 @@ static int ds4424_verify_chip(struct iio_dev *indio_dev)
 {
 	int ret, val;
 
-	ret = ds4424_get_value(indio_dev, &val, DS4424_DAC_ADDR(0));
+	ret = ds4424_get_value(indio_dev, &val, 0);
 	if (ret < 0)
 		dev_err(&indio_dev->dev,
 				"%s failed. ret: %d\n", __func__, ret);
-- 
2.17.1


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

* Re: [PATCH 2/2] iio: dac: ds4422/ds4424 fix chip verification
  2019-05-05 19:24 [PATCH 2/2] iio: dac: ds4422/ds4424 fix chip verification Ruslan Babayev
@ 2019-05-11 11:49 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2019-05-11 11:49 UTC (permalink / raw)
  To: Ruslan Babayev
  Cc: Andrew Morton, xe-linux-external, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler, linux-iio,
	linux-kernel

On Sun,  5 May 2019 12:24:37 -0700
Ruslan Babayev <ruslan@babayev.com> wrote:

> The ds4424_get_value function takes channel number as it's 3rd
> argument and translates it internally into I2C address using
> DS4424_DAC_ADDR macro. The caller ds4424_verify_chip was passing an
> already translated I2C address as its last argument.
> 
> Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
> Cc: xe-linux-external@cisco.com
Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks,

Jonathan

> ---
>  drivers/iio/dac/ds4424.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/dac/ds4424.c b/drivers/iio/dac/ds4424.c
> index 2b3ba1a66fe8..ae9be792693b 100644
> --- a/drivers/iio/dac/ds4424.c
> +++ b/drivers/iio/dac/ds4424.c
> @@ -166,7 +166,7 @@ static int ds4424_verify_chip(struct iio_dev *indio_dev)
>  {
>  	int ret, val;
>  
> -	ret = ds4424_get_value(indio_dev, &val, DS4424_DAC_ADDR(0));
> +	ret = ds4424_get_value(indio_dev, &val, 0);
>  	if (ret < 0)
>  		dev_err(&indio_dev->dev,
>  				"%s failed. ret: %d\n", __func__, ret);


^ 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-05-05 19:24 [PATCH 2/2] iio: dac: ds4422/ds4424 fix chip verification Ruslan Babayev
2019-05-11 11:49 ` 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