aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDerek Basehore <dbasehore@chromium.org>2013-08-29 21:14:00 +0100
committerJonathan Cameron <jic23@kernel.org>2013-09-18 19:43:25 +0100
commit5e64897638169d13f1637eecdaf8cb8512c4a3a1 (patch)
tree8a87e9feeba2fa8e591b5f8ca1cd07cf4f683ec5 /drivers
parentc919095657781bfa58453842f1dd656857b97f84 (diff)
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 <dbasehore@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/65998 Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/iio/light/isl29018.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c
index 351936c3efd..e4998e4d443 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;