Re: [PATCH 3/4] iio: xilinx-xadc-core: Use local variable in xadc_read_raw

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

 



On Mon,  1 Nov 2021 00:18:21 -0700
Gwendal Grignou <gwendal@xxxxxxxxxxxx> wrote:

> Minor cleanup: bit is already defined as chan->scan_type.realbits,
> use bit when needed.
> 
bits

> Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
Otherwise looks good to me.

> ---
>  drivers/iio/adc/xilinx-xadc-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
> index 83bea5ef765da..05050709e4f8a 100644
> --- a/drivers/iio/adc/xilinx-xadc-core.c
> +++ b/drivers/iio/adc/xilinx-xadc-core.c
> @@ -943,7 +943,7 @@ static int xadc_read_raw(struct iio_dev *indio_dev,
>  				*val = 1000;
>  				break;
>  			}
> -			*val2 = chan->scan_type.realbits;
> +			*val2 = bits;
>  			return IIO_VAL_FRACTIONAL_LOG2;
>  		case IIO_TEMP:
>  			/* Temp in C = (val * 503.975) / 2**bits - 273.15 */




[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