All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: ltc2688: fix voltage scale read
@ 2022-04-11  9:59 Nuno Sá
  2022-04-16 13:50 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Nuno Sá @ 2022-04-11  9:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

Properly set *val2 (and not not overwrite *val) to correctly return
IIO_VAL_FRACTIONAL_LOG2.

Fixes: 832cb9eeb9312 ("iio: dac: add support for ltc2688")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
 drivers/iio/dac/ltc2688.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/dac/ltc2688.c b/drivers/iio/dac/ltc2688.c
index d249fa28202c..937b0d25a11c 100644
--- a/drivers/iio/dac/ltc2688.c
+++ b/drivers/iio/dac/ltc2688.c
@@ -298,7 +298,7 @@ static int ltc2688_read_raw(struct iio_dev *indio_dev,
 		if (ret)
 			return ret;
 
-		*val = 16;
+		*val2 = 16;
 		return IIO_VAL_FRACTIONAL_LOG2;
 	case IIO_CHAN_INFO_CALIBBIAS:
 		ret = regmap_read(st->regmap,
-- 
2.35.1


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

* Re: [PATCH] iio: ltc2688: fix voltage scale read
  2022-04-11  9:59 [PATCH] iio: ltc2688: fix voltage scale read Nuno Sá
@ 2022-04-16 13:50 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2022-04-16 13:50 UTC (permalink / raw)
  To: Nuno Sá; +Cc: linux-iio, Lars-Peter Clausen

On Mon, 11 Apr 2022 11:59:19 +0200
Nuno Sá <nuno.sa@analog.com> wrote:

> Properly set *val2 (and not not overwrite *val) to correctly return
> IIO_VAL_FRACTIONAL_LOG2.
> 
> Fixes: 832cb9eeb9312 ("iio: dac: add support for ltc2688")
> Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Applied to the fixes-togreg branch of iio.git.

Thanks,

Jonathan

> ---
>  drivers/iio/dac/ltc2688.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/dac/ltc2688.c b/drivers/iio/dac/ltc2688.c
> index d249fa28202c..937b0d25a11c 100644
> --- a/drivers/iio/dac/ltc2688.c
> +++ b/drivers/iio/dac/ltc2688.c
> @@ -298,7 +298,7 @@ static int ltc2688_read_raw(struct iio_dev *indio_dev,
>  		if (ret)
>  			return ret;
>  
> -		*val = 16;
> +		*val2 = 16;
>  		return IIO_VAL_FRACTIONAL_LOG2;
>  	case IIO_CHAN_INFO_CALIBBIAS:
>  		ret = regmap_read(st->regmap,


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

end of thread, other threads:[~2022-04-16 13:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11  9:59 [PATCH] iio: ltc2688: fix voltage scale read Nuno Sá
2022-04-16 13:50 ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.