diff options
author | Derek Basehore <dbasehore@chromium.org> | 2013-08-29 16:14:00 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-09-18 14:43:25 -0400 |
commit | 5e64897638169d13f1637eecdaf8cb8512c4a3a1 (patch) | |
tree | 8a87e9feeba2fa8e591b5f8ca1cd07cf4f683ec5 | |
parent | c919095657781bfa58453842f1dd656857b97f84 (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>
-rw-r--r-- | drivers/staging/iio/light/isl29018.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c index 351936c3efd6..e4998e4d4434 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, | |||
563 | mutex_init(&chip->lock); | 563 | mutex_init(&chip->lock); |
564 | 564 | ||
565 | chip->lux_scale = 1; | 565 | chip->lux_scale = 1; |
566 | chip->lux_uscale = 0; | ||
566 | chip->range = 1000; | 567 | chip->range = 1000; |
567 | chip->adc_bit = 16; | 568 | chip->adc_bit = 16; |
568 | chip->suspended = false; | 569 | chip->suspended = false; |