linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jonathan Cameron <jic23@cam.ac.uk>, linux-iio@vger.kernel.org
Subject: Re: [PATCH 2/4] staging:iio:adis16130: Fix sample reading
Date: Tue, 11 Jun 2013 20:33:31 +0100	[thread overview]
Message-ID: <51B77B8B.9010009@kernel.org> (raw)
In-Reply-To: <1370872815-14386-2-git-send-email-lars@metafoo.de>

On 06/10/2013 03:00 PM, Lars-Peter Clausen wrote:
> The driver first does a proper read of the data register, but right after that
> it does a spi_read, which will overwrite the initial result.
> 
> It looks as if the extra spi_read was accidentally introduced in commit
> a5e7363ca ("staging:iio:gyro:adis16130 drop control of adc resolution."), quite
> likely due to a bad rebase.
> 
oops.  This is a rather old bug now so I'm not rushing this one out. It can
wait for the next merge cycle, at which point you might want to request it is
applied to the stable trees.
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied to the togreg branch of iio.git

> ---
>  drivers/staging/iio/gyro/adis16130_core.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/gyro/adis16130_core.c b/drivers/staging/iio/gyro/adis16130_core.c
> index 5288635..2537f59 100644
> --- a/drivers/staging/iio/gyro/adis16130_core.c
> +++ b/drivers/staging/iio/gyro/adis16130_core.c
> @@ -62,7 +62,6 @@ static int adis16130_spi_read(struct iio_dev *indio_dev, u8 reg_addr, u32 *val)
>  	spi_message_init(&msg);
>  	spi_message_add_tail(&xfer, &msg);
>  	ret = spi_sync(st->us, &msg);
> -	ret = spi_read(st->us, st->buf, 4);
>  
>  	if (ret == 0)
>  		*val = (st->buf[1] << 16) | (st->buf[2] << 8) | st->buf[3];
> 

  reply	other threads:[~2013-06-11 19:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-10 14:00 [PATCH 1/4] staging:iio:adis16130: Remove unused includes Lars-Peter Clausen
2013-06-10 14:00 ` [PATCH 2/4] staging:iio:adis16130: Fix sample reading Lars-Peter Clausen
2013-06-11 19:33   ` Jonathan Cameron [this message]
2013-06-10 14:00 ` [PATCH 3/4] staging:iio:adis16130: Report scale and offset Lars-Peter Clausen
2013-06-11 19:34   ` Jonathan Cameron
2013-06-10 14:00 ` [PATCH 4/4] staging:iio:adis16130: Move out of staging Lars-Peter Clausen
2013-06-11 19:35   ` Jonathan Cameron
2013-06-11 19:32 ` [PATCH 1/4] staging:iio:adis16130: Remove unused includes Jonathan Cameron

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=51B77B8B.9010009@kernel.org \
    --to=jic23@kernel.org \
    --cc=jic23@cam.ac.uk \
    --cc=lars@metafoo.de \
    --cc=linux-iio@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).