regulator: core: Don't open code _regulator_is_enabled()
PATCH 1/1 regulator: core: Don't open code _regulator_is_enabled()
Signed-off-by Mark Brown <[email protected]>
--- drivers/regulator/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/regulator/core.c +2 -3
@@ -3163,8 +3163,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;
@@ -3296,7 +3295,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);
Signature · 1 line
1.7.10
Quoted 4 lines · Mark Brown
Signed-off-by Mark Brown <[email protected]>--- drivers/regulator/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Acked-by Liam Girdwood <[email protected]>