aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-13 19:40:14 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-14 10:25:19 -0400
commitb1a868310e7024650918119d292129446b2f8336 (patch)
tree48f9abf6152e4107d9dfb8bf017da30507d7207e /drivers/regulator
parentf0b067d9b6474e5309dd47ab30264cd0a48d4963 (diff)
regulator: core: Don't open code _regulator_is_enabled()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 5a33282181d..faa05327819 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3160,8 +3160,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
3160 goto scrub; 3160 goto scrub;
3161 3161
3162 /* Enable supply if rail is enabled */ 3162 /* Enable supply if rail is enabled */
3163 if (rdev->desc->ops->is_enabled && 3163 if (_regulator_is_enabled(rdev)) {
3164 rdev->desc->ops->is_enabled(rdev)) {
3165 ret = regulator_enable(rdev->supply); 3164 ret = regulator_enable(rdev->supply);
3166 if (ret < 0) 3165 if (ret < 0)
3167 goto scrub; 3166 goto scrub;
@@ -3293,7 +3292,7 @@ int regulator_suspend_finish(void)
3293 goto unlock; 3292 goto unlock;
3294 if (!ops->disable) 3293 if (!ops->disable)
3295 goto unlock; 3294 goto unlock;
3296 if (ops->is_enabled && !ops->is_enabled(rdev)) 3295 if (!_regulator_is_enabled(rdev))
3297 goto unlock; 3296 goto unlock;
3298 3297
3299 error = ops->disable(rdev); 3298 error = ops->disable(rdev);