Message ID | 20220108205319.2046348-2-liambeguin@gmail.com |
---|---|
State | Accepted |
Commit | 1bca97ff95c732a516ebb68da72814194980e0a5 |
Headers | show |
Series | [v12,01/16] iio: inkern: apply consumer scale on IIO_VAL_INT cases | expand |
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c index 0222885b334c..021e1397ffc5 100644 --- a/drivers/iio/inkern.c +++ b/drivers/iio/inkern.c @@ -616,7 +616,7 @@ static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan, switch (scale_type) { case IIO_VAL_INT: - *processed = raw64 * scale_val; + *processed = raw64 * scale_val * scale; break; case IIO_VAL_INT_PLUS_MICRO: if (scale_val2 < 0)