Skip to content

Commit

Permalink
iio: isl29018: Fix uninitialized value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Derek Basehore authored and Jonathan Cameron committed Sep 18, 2013
1 parent c919095 commit 5e64897
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/staging/iio/light/isl29018.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5e64897

Please sign in to comment.