* [PATCH] iio: isl29018: Fix uninitialized value
@ 2013-08-29 20:14 Derek Basehore
2013-09-08 13:48 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Derek Basehore @ 2013-08-29 20:14 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Greg Kroah-Hartman, Bill Pemberton, Bryan Freed, Derek Basehore,
linux-iio, devel, linux-kernel
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
---
drivers/staging/iio/light/isl29018.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c
index 82478a5..28c6386 100644
--- a/drivers/staging/iio/light/isl29018.c
+++ b/drivers/staging/iio/light/isl29018.c
@@ -564,6 +564,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;
--
1.8.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: isl29018: Fix uninitialized value
2013-08-29 20:14 [PATCH] iio: isl29018: Fix uninitialized value Derek Basehore
@ 2013-09-08 13:48 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2013-09-08 13:48 UTC (permalink / raw)
To: Derek Basehore
Cc: Jonathan Cameron, Greg Kroah-Hartman, Bill Pemberton, Bryan Freed,
linux-iio, devel, linux-kernel
On 08/29/13 21:14, Derek Basehore wrote:
> 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
Thanks,
Applied to the fixes-togreg branch of iio.git
I'll send this onwards in a few days.
Jonathan
> ---
> drivers/staging/iio/light/isl29018.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c
> index 82478a5..28c6386 100644
> --- a/drivers/staging/iio/light/isl29018.c
> +++ b/drivers/staging/iio/light/isl29018.c
> @@ -564,6 +564,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;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-08 12:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-29 20:14 [PATCH] iio: isl29018: Fix uninitialized value Derek Basehore
2013-09-08 13:48 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).