From: Brian Masney Date: Sat, 12 Nov 2016 18:19:31 +0000 (-0500) Subject: staging: iio: tsl2583: change tsl2583_als_calibrate() to return 0 on success X-Git-Tag: v4.14-rc1~1919^2~229^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a8898dced810013440cb5eaf7a86f8e30d2ab34c;p=platform%2Fkernel%2Flinux-rpi3.git staging: iio: tsl2583: change tsl2583_als_calibrate() to return 0 on success 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 Signed-off-by: Jonathan Cameron --- diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c index a319ed0..13ea62a 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)