Merge "iio: adc: qcom-tadc: cast raw ADC readings before conversion"
This commit is contained in:
commit
2db8e29779
1 changed files with 1 additions and 1 deletions
|
@ -398,7 +398,7 @@ static int tadc_do_conversion(struct tadc_chip *chip, u8 channels, s16 *adc)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < TADC_NUM_CH; i++)
|
for (i = 0; i < TADC_NUM_CH; i++)
|
||||||
adc[i] = val[i * 2] | val[i * 2 + 1] << BITS_PER_BYTE;
|
adc[i] = (s16)(val[i * 2] | (u16)val[i * 2 + 1] << 8);
|
||||||
|
|
||||||
return jiffies_to_msecs(timeout - timeleft);
|
return jiffies_to_msecs(timeout - timeleft);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue