diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-02-08 17:13:39 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-02-08 19:03:51 -0800 |
commit | ec44fd429879f7d4f28021f1a7f9fb0b5f831aab (patch) | |
tree | a9663df153dec41ad0805eb82a429780a1952965 /drivers/leds | |
parent | dc9086004b3d5db75997a645b3fe08d9138b7ad0 (diff) | |
download | linux-stable-ec44fd429879f7d4f28021f1a7f9fb0b5f831aab.tar.gz linux-stable-ec44fd429879f7d4f28021f1a7f9fb0b5f831aab.tar.bz2 linux-stable-ec44fd429879f7d4f28021f1a7f9fb0b5f831aab.zip |
drivers/leds/leds-lm3530.c: fix setting pltfm->als_vmax
In current code, pltfm->als_vmin is set to LM3530_ALS_WINDOW_mV and
pltfm->als_vmax is 0. This does not make sense. I think what we want
here is setting pltfm->als_vmax to LM3530_ALS_WINDOW_mV.
Both als_vmin and als_vmax local variables will be set to
pltfm->als_vmin and pltfm->als_vmax by a few lines latter. Thus also
remove a redundant assignment for als_vmin and als_vmax in this patch.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Tested-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-lm3530.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c index 45e6878d7374..e59c166a0ce2 100644 --- a/drivers/leds/leds-lm3530.c +++ b/drivers/leds/leds-lm3530.c @@ -164,8 +164,8 @@ static int lm3530_init_registers(struct lm3530_data *drvdata) if (drvdata->mode == LM3530_BL_MODE_ALS) { if (pltfm->als_vmax == 0) { - pltfm->als_vmin = als_vmin = 0; - pltfm->als_vmin = als_vmax = LM3530_ALS_WINDOW_mV; + pltfm->als_vmin = 0; + pltfm->als_vmax = LM3530_ALS_WINDOW_mV; } als_vmin = pltfm->als_vmin; |