From: Derek Basehore Date: Thu, 29 Aug 2013 20:14:00 +0000 (+0100) Subject: iio: isl29018: Fix uninitialized value X-Git-Tag: v3.12-rc2~1^2^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e64897638169d13f1637eecdaf8cb8512c4a3a1;p=profile%2Fivi%2Fkernel-x86-ivi.git iio: isl29018: Fix uninitialized value The lux_uscale value is not initialized at probe. The value will be uninitialized unless a value is written to it through the iio channel interface. This fixes that. Signed-off-by: Derek Basehore Reviewed-on: https://gerrit.chromium.org/gerrit/65998 Signed-off-by: Jonathan Cameron --- diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c index 351936c..e4998e4 100644 --- a/drivers/staging/iio/light/isl29018.c +++ b/drivers/staging/iio/light/isl29018.c @@ -563,6 +563,7 @@ static int isl29018_probe(struct i2c_client *client, mutex_init(&chip->lock); chip->lux_scale = 1; + chip->lux_uscale = 0; chip->range = 1000; chip->adc_bit = 16; chip->suspended = false;