Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1520341 > unrolled thread

[PATCH v4 16/26] staging: iio: tsl2583: change tsl2583_als_calibrate() to return 0 on success

Started byBrian Masney <masneyb@onstation.org>
First post2016-11-12 19:30 +0100
Last post2016-11-12 19:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v4 16/26] staging: iio: tsl2583: change tsl2583_als_calibrate() to return 0 on success Brian Masney <masneyb@onstation.org> - 2016-11-12 19:30 +0100

#1520341 — [PATCH v4 16/26] staging: iio: tsl2583: change tsl2583_als_calibrate() to return 0 on success

FromBrian Masney <masneyb@onstation.org>
Date2016-11-12 19:30 +0100
Subject[PATCH v4 16/26] staging: iio: tsl2583: change tsl2583_als_calibrate() to return 0 on success
Message-ID<sCLdV-5L4-67@gated-at.bofh.it>
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@onstation.org>
---
 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 bcdf095..fc58074 100644
--- a/drivers/staging/iio/light/tsl2583.c
+++ b/drivers/staging/iio/light/tsl2583.c
@@ -348,7 +348,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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web