Commit fb3e8bb4 authored by Gwendal Grignou's avatar Gwendal Grignou Committed by Jonathan Cameron

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: default avatarGwendal Grignou <gwendal@chromium.org>
Link: https://lore.kernel.org/r/20211104082413.3681212-13-gwendal@chromium.orgSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent aad54091
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment