diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2021-11-04 09:24:12 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-11-17 18:51:44 +0100 |
commit | fb3e8bb47806a3e41d200841518726a9e700e283 (patch) | |
tree | 0f14fb53a4ce1b5a4882b49be124fd609279e262 /drivers/iio/adc | |
parent | iio: ti-ads1015: Remove shift variable ads1015_read_raw (diff) | |
download | linux-fb3e8bb47806a3e41d200841518726a9e700e283.tar.xz linux-fb3e8bb47806a3e41d200841518726a9e700e283.zip |
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>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r-- | drivers/iio/adc/xilinx-xadc-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c index 2aa4278ecba7..823c8e5f9809 100644 --- a/drivers/iio/adc/xilinx-xadc-core.c +++ b/drivers/iio/adc/xilinx-xadc-core.c @@ -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 */ |