Re: [PATCH] iio: adc: ab8500-gpadc: Fix off by 10 to 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 24 Dec 2020 02:17:00 +0100
Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:

> Fix an off by three orders of magnitude error in the AB8500
> GPADC driver. Luckily it showed up quite quickly when trying
> to make use of it. The processed reads were returning
> microvolts, microamperes and microcelsius instead of millivolts,
> milliamperes and millicelsius as advertised.
> 
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: 07063bbfa98e ("iio: adc: New driver for the AB8500 GPADC")
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
No idea why I didn't pick this up before now.  I guess I forgot it
over xmas.

Anyhow, now applied to the fixes-togreg branch of iio.git.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/ab8500-gpadc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ab8500-gpadc.c b/drivers/iio/adc/ab8500-gpadc.c
> index 6f9a3e2d5533..7b5212ba5501 100644
> --- a/drivers/iio/adc/ab8500-gpadc.c
> +++ b/drivers/iio/adc/ab8500-gpadc.c
> @@ -918,7 +918,7 @@ static int ab8500_gpadc_read_raw(struct iio_dev *indio_dev,
>  			return processed;
>  
>  		/* Return millivolt or milliamps or millicentigrades */
> -		*val = processed * 1000;
> +		*val = processed;
>  		return IIO_VAL_INT;
>  	}
>  




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux