]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
iio: isl29018: Fix uninitialized value
authorDerek Basehore <dbasehore@chromium.org>
Thu, 29 Aug 2013 20:14:00 +0000 (21:14 +0100)
committerJonathan Cameron <jic23@kernel.org>
Wed, 18 Sep 2013 18:43:25 +0000 (19:43 +0100)
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>
drivers/staging/iio/light/isl29018.c

index 351936c3efd698e8c5cbe76d7878eb8ad16c311f..e4998e4d4434b2af9365aacc1a8c4137a4c70544 100644 (file)
@@ -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;