diff options
Diffstat (limited to 'drivers/leds/leds-regulator.c')
-rw-r--r-- | drivers/leds/leds-regulator.c | 4 |
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) | |||
178 | led->cdev.flags |= LED_CORE_SUSPENDRESUME; | 178 | led->cdev.flags |= LED_CORE_SUSPENDRESUME; |
179 | led->vcc = vcc; | 179 | led->vcc = vcc; |
180 | 180 | ||
181 | /* to handle correctly an already enabled regulator */ | ||
182 | if (regulator_is_enabled(led->vcc)) | ||
183 | led->enabled = 1; | ||
184 | |||
181 | mutex_init(&led->mutex); | 185 | mutex_init(&led->mutex); |
182 | INIT_WORK(&led->work, led_work); | 186 | INIT_WORK(&led->work, led_work); |
183 | 187 | ||