Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iio: fix scale application in iio_convert_raw_to_processed_unlocked
commit 8a3dcc9 upstream. When the scale_type is IIO_VAL_INT_PLUS_MICRO or IIO_VAL_INT_PLUS_NANO the scale passed as argument is only applied to the fractional part of the value. Fix it by also multiplying the integer part by the scale provided. Fixes: 48e44ce ("iio:inkern: Add function to read the processed value") Signed-off-by: Matteo Martelli <[email protected]> Link: https://patch.msgid.link/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information