diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-14 00:40:14 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-14 15:25:19 +0100 |
commit | b1a868310e7024650918119d292129446b2f8336 (patch) | |
tree | 48f9abf6152e4107d9dfb8bf017da30507d7207e /drivers/regulator | |
parent | f0b067d9b6474e5309dd47ab30264cd0a48d4963 (diff) | |
download | op-kernel-dev-b1a868310e7024650918119d292129446b2f8336.zip op-kernel-dev-b1a868310e7024650918119d292129446b2f8336.tar.gz |
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.c | 5 |
1 files changed, 2 insertions, 3 deletions
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); |