From: Mark Brown Date: Sun, 13 May 2012 23:40:14 +0000 (+0100) Subject: regulator: core: Don't open code _regulator_is_enabled() X-Git-Tag: upstream/snapshot3+hdmi~7471^2~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1a868310e7024650918119d292129446b2f8336;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git regulator: core: Don't open code _regulator_is_enabled() Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 5a33282..faa0532 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3160,8 +3160,7 @@ regulator_register(const struct regulator_desc *regulator_desc, goto scrub; /* Enable supply if rail is enabled */ - if (rdev->desc->ops->is_enabled && - rdev->desc->ops->is_enabled(rdev)) { + if (_regulator_is_enabled(rdev)) { ret = regulator_enable(rdev->supply); if (ret < 0) goto scrub; @@ -3293,7 +3292,7 @@ int regulator_suspend_finish(void) goto unlock; if (!ops->disable) goto unlock; - if (ops->is_enabled && !ops->is_enabled(rdev)) + if (!_regulator_is_enabled(rdev)) goto unlock; error = ops->disable(rdev);