summaryrefslogtreecommitdiff
path: root/drivers/leds/leds-regulator.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-04-21 13:39:21 +0400
committerIngo Molnar <mingo@elte.hu>2011-04-21 13:39:28 +0400
commit42ac9e87fdd89b77fa2ca0a5226023c1c2d83226 (patch)
treedfdb1b720347a40f24a89a3e9c2727ae26ad5f01 /drivers/leds/leds-regulator.c
parent057f3fadb347e9c51b07e1b277bbdda79f976768 (diff)
parentf0e615c3cb72b42191b558c130409335812621d8 (diff)
downloadlinux-42ac9e87fdd89b77fa2ca0a5226023c1c2d83226.tar.xz
Merge commit 'v2.6.39-rc4' into sched/core
Merge reason: Pick up upstream fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/leds/leds-regulator.c')
-rw-r--r--drivers/leds/leds-regulator.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/leds/leds-regulator.c b/drivers/leds/leds-regulator.c
index 3790816643be..8497f56f8e46 100644
--- a/drivers/leds/leds-regulator.c
+++ b/drivers/leds/leds-regulator.c
@@ -178,6 +178,10 @@ static int __devinit regulator_led_probe(struct platform_device *pdev)
led->cdev.flags |= LED_CORE_SUSPENDRESUME;
led->vcc = vcc;
+ /* to handle correctly an already enabled regulator */
+ if (regulator_is_enabled(led->vcc))
+ led->enabled = 1;
+
mutex_init(&led->mutex);
INIT_WORK(&led->work, led_work);