From 08390b1a417e465df3e18ff8075afe31af8a3f73 Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Sun, 24 Nov 2024 00:23:38 +0100 Subject: [PATCH] Revert "iio: fix scale application in iio_convert_raw_to_processed_unlocked" This reverts commit 7065933b9992cef36fe574b0dc262d6f1b3598c0. --- drivers/iio/inkern.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c index 6e64ffde6..c32b2577d 100755 --- a/drivers/iio/inkern.c +++ b/drivers/iio/inkern.c @@ -610,17 +610,17 @@ static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan, break; case IIO_VAL_INT_PLUS_MICRO: if (scale_val2 < 0) - *processed = -raw64 * scale_val * scale; + *processed = -raw64 * scale_val; else - *processed = raw64 * scale_val * scale; + *processed = raw64 * scale_val; *processed += div_s64(raw64 * (s64)scale_val2 * scale, 1000000LL); break; case IIO_VAL_INT_PLUS_NANO: if (scale_val2 < 0) - *processed = -raw64 * scale_val * scale; + *processed = -raw64 * scale_val; else - *processed = raw64 * scale_val * scale; + *processed = raw64 * scale_val; *processed += div_s64(raw64 * (s64)scale_val2 * scale, 1000000000LL); break;