Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: michael.hennerich@analog.com
Cc: linux-iio@vger.kernel.org, drivers@analog.com,
	device-drivers-devel@blackfin.uclinux.org
Subject: Re: [PATCH 2/6] IIO: GYRO: ADXRS450: Cleanup result extraction and update license notice
Date: Fri, 29 Apr 2011 13:08:15 +0100	[thread overview]
Message-ID: <4DBAAA2F.5060604@cam.ac.uk> (raw)
In-Reply-To: <1304074721-18159-2-git-send-email-michael.hennerich@analog.com>

On 04/29/11 11:58, michael.hennerich@analog.com wrote:
> From: Michael Hennerich <michael.hennerich@analog.com>
> 
> Cleanup result extraction and update license notice, no functional changes.
> 
> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
> ---
>  drivers/staging/iio/gyro/adxrs450_core.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/iio/gyro/adxrs450_core.c b/drivers/staging/iio/gyro/adxrs450_core.c
> index a1a71b7..c02e3ef 100644
> --- a/drivers/staging/iio/gyro/adxrs450_core.c
> +++ b/drivers/staging/iio/gyro/adxrs450_core.c
> @@ -3,7 +3,7 @@
>   *
>   * Copyright 2011 Analog Devices Inc.
>   *
> - * Licensed under the GPL-2 or later.
> + * Licensed under the GPL-2.
>   */
>  
>  #include <linux/interrupt.h>
> @@ -69,7 +69,7 @@ static int adxrs450_spi_read_reg_16(struct device *dev,
>  		goto error_ret;
>  	}
>  
> -	*val = (st->rx[1] & 0x1f) << 11 | st->rx[2] << 3 | (st->rx[3] & 0xe0) >> 5;
> +	*val = (be32_to_cpu(*(u32 *)st->rx) >> 5) & 0xFFFF;
>  
>  error_ret:
>  	mutex_unlock(&st->buf_lock);
> @@ -152,7 +152,8 @@ static int adxrs450_spi_sensor_data(struct device *dev, u16 *val)
>  		goto error_ret;
>  	}
>  
> -	*val = (st->rx[0] & 0x03) << 14 | st->rx[1] << 6 | (st->rx[2] & 0xfc) >> 2;
> +	*val = (be32_to_cpu(*(u32 *)st->rx) >> 10) & 0xFFFF;
> +
>  error_ret:
>  	mutex_unlock(&st->buf_lock);
>  	return ret;


  reply	other threads:[~2011-04-29 12:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-29 10:58 [PATCH 1/6] IIO: GYRO: ADXRS450: Don't issue two messages, use two transfers michael.hennerich
2011-04-29 10:58 ` [PATCH 2/6] IIO: GYRO: ADXRS450: Cleanup result extraction and update license notice michael.hennerich
2011-04-29 12:08   ` Jonathan Cameron [this message]
2011-04-29 10:58 ` [PATCH 3/6] IIO: GYRO: ADXRS450: Add missing parity bit generation michael.hennerich
2011-04-29 12:09   ` Jonathan Cameron
2011-04-29 10:58 ` [PATCH 4/6] IIO: GYRO: ADXRS450: enforce sequential transfer delay of at least 0.1ms michael.hennerich
2011-04-29 12:12   ` Jonathan Cameron
2011-04-29 10:58 ` [PATCH 5/6] IIO: GYRO: ADXRS450: Fix sign issues, properly shift results and limit values michael.hennerich
2011-04-29 12:14   ` Jonathan Cameron
2011-04-29 10:58 ` [PATCH 6/6] IIO: GYRO: ADXRS450: Don't exit probe, in case the power on default is not met michael.hennerich
2011-04-29 12:15   ` Jonathan Cameron
2011-04-29 12:05 ` [PATCH 1/6] IIO: GYRO: ADXRS450: Don't issue two messages, use two transfers Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2011-04-29 12:16 michael.hennerich
2011-04-29 12:17 ` [PATCH 2/6] IIO: GYRO: ADXRS450: Cleanup result extraction and update license notice michael.hennerich

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=4DBAAA2F.5060604@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=drivers@analog.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    /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