[PATCH v3 18/28] staging: iio: tsl2583: change tsl2583_als_calibrate() to return 0 on success

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tsl2583_als_calibrate() returns the newly computed gain_trim if the
calibration was successful. This function is only called by
in_illuminance_calibrate_store() and the return value inside that
sysfs attribute is only checked to see if an error was returned.
This patch changes tsl2583_als_calibrate() to return 0 on success.

Signed-off-by: Brian Masney <masneyb@xxxxxxxxxxxxx>
---
 drivers/staging/iio/light/tsl2583.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
index bdd395a..ad4ea8a 100644
--- a/drivers/staging/iio/light/tsl2583.c
+++ b/drivers/staging/iio/light/tsl2583.c
@@ -344,7 +344,7 @@ static int tsl2583_als_calibrate(struct iio_dev *indio_dev)
 
 	chip->als_settings.als_gain_trim = (int)gain_trim_val;
 
-	return (int)gain_trim_val;
+	return 0;
 }
 
 static int tsl2583_set_als_time(struct tsl2583_chip *chip)
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux