diff options
-rw-r--r-- | drivers/regulator/core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index e70e15c4aa28..eb750a1ed7fe 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -2802,6 +2802,14 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, | |||
2802 | ret = set_supply(rdev, r); | 2802 | ret = set_supply(rdev, r); |
2803 | if (ret < 0) | 2803 | if (ret < 0) |
2804 | goto scrub; | 2804 | goto scrub; |
2805 | |||
2806 | /* Enable supply if rail is enabled */ | ||
2807 | if (rdev->desc->ops->is_enabled && | ||
2808 | rdev->desc->ops->is_enabled(rdev)) { | ||
2809 | ret = regulator_enable(rdev->supply); | ||
2810 | if (ret < 0) | ||
2811 | goto scrub; | ||
2812 | } | ||
2805 | } | 2813 | } |
2806 | 2814 | ||
2807 | /* add consumers devices */ | 2815 | /* add consumers devices */ |