All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Fugang Duan <b38611@freescale.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH 1/1] iio: adc: vf610: fix the adc register read fail issue
Date: Sun, 19 Jul 2015 13:30:39 +0100	[thread overview]
Message-ID: <55AB986F.5060202@kernel.org> (raw)
In-Reply-To: <1437029349-5446-1-git-send-email-b38611@freescale.com>

On 16/07/15 07:49, Fugang Duan wrote:
> Read the register only when the adc register address is 4 byte aligned.
> 
> Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
> Signed-off-by: Fugang Duan <B38611@freescale.com>
Applied to the fixes-togreg branch of iio.git and marked for stable.
> ---
>  drivers/iio/adc/vf610_adc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c
> index 480f335..819632b 100644
> --- a/drivers/iio/adc/vf610_adc.c
> +++ b/drivers/iio/adc/vf610_adc.c
> @@ -635,7 +635,7 @@ static int vf610_adc_reg_access(struct iio_dev *indio_dev,
>  	struct vf610_adc *info = iio_priv(indio_dev);
>  
>  	if ((readval == NULL) ||
> -		(!(reg % 4) || (reg > VF610_REG_ADC_PCTL)))
> +		((reg % 4) || (reg > VF610_REG_ADC_PCTL)))
>  		return -EINVAL;
>  
>  	*readval = readl(info->regs + reg);
> 


      reply	other threads:[~2015-07-19 12:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16  6:49 [PATCH 1/1] iio: adc: vf610: fix the adc register read fail issue Fugang Duan
2015-07-19 12:30 ` Jonathan Cameron [this message]

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=55AB986F.5060202@kernel.org \
    --to=jic23@kernel.org \
    --cc=b38611@freescale.com \
    --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 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.