Re: [PATCH 1/1] iio: adc: vf610: fix the adc register read fail issue

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

 



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@xxxxxxxxxxxxx>
> Signed-off-by: Fugang Duan <B38611@xxxxxxxxxxxxx>
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);
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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