iio: xilinx-xadc-core: Use local variable in xadc_read_raw
Minor cleanup: bit is already defined as chan->scan_type.realbits, use bit when needed. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211104082413.3681212-13-gwendal@chromium.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
aad54091e1
commit
fb3e8bb478
@ -944,7 +944,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 */
|
||||
|
Loading…
Reference in New Issue
Block a user