Browse Source

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>
Derek Basehore 12 years ago
parent
commit
5e64897638
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/staging/iio/light/isl29018.c

+ 1 - 0
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;