diff --git a/drivers/leds/leds-regulator.c b/drivers/leds/leds-regulator.c index 3790816643bef85bee2dd1824bcb29818a693f86..8497f56f8e461cf70d8d1b8692e04b11e353323c 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);