Re: [PATCH] iio: adc: spmi-vadc: Fix overflow in output value normalization

2015-04-18 Thread Jonathan Cameron
On 17/04/15 15:51, Ivan T. Ivanov wrote: > With 'dx' equal to 0.625V and 15 bit ADC, calculations overflow > when difference against GND is ~20% of the ADC range. Fix this. > > Signed-off-by: Ivan T. Ivanov Applied to the fixes-togreg branch of iio.git and marked for stable. Thanks, Jonathan >

[PATCH] iio: adc: spmi-vadc: Fix overflow in output value normalization

2015-04-17 Thread Ivan T. Ivanov
With 'dx' equal to 0.625V and 15 bit ADC, calculations overflow when difference against GND is ~20% of the ADC range. Fix this. Signed-off-by: Ivan T. Ivanov --- drivers/iio/adc/qcom-spmi-vadc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/iio/adc/qcom-spmi-