All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	stable@vger.kernel.org
Subject: Re: [PATCH] iio: adc: ab8500-gpadc: Fix off by 10 to 3
Date: Sun, 21 Feb 2021 16:18:01 +0000	[thread overview]
Message-ID: <20210221161801.42532e87@archlinux> (raw)
In-Reply-To: <20201224011700.1059659-1-linus.walleij@linaro.org>

On Thu, 24 Dec 2020 02:17:00 +0100
Linus Walleij <linus.walleij@linaro.org> 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@vger.kernel.org
> Fixes: 07063bbfa98e ("iio: adc: New driver for the AB8500 GPADC")
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
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;
>  	}
>  


  reply	other threads:[~2021-02-21 16:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-24  1:17 [PATCH] iio: adc: ab8500-gpadc: Fix off by 10 to 3 Linus Walleij
2021-02-21 16:18 ` Jonathan Cameron [this message]
2021-02-22 23:56   ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210221161801.42532e87@archlinux \
    --to=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.