* [PATCH] regulator: core: Don't open code _regulator_is_enabled()
@ 2012-05-14 12:22 Mark Brown
2012-05-14 12:43 ` Liam Girdwood
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2012-05-14 12:22 UTC (permalink / raw)
To: Liam Girdwood; +Cc: linux-kernel, Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/regulator/core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 28b9c31..56768bd 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -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);
--
1.7.10
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: core: Don't open code _regulator_is_enabled()
2012-05-14 12:22 [PATCH] regulator: core: Don't open code _regulator_is_enabled() Mark Brown
@ 2012-05-14 12:43 ` Liam Girdwood
0 siblings, 0 replies; 2+ messages in thread
From: Liam Girdwood @ 2012-05-14 12:43 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel
On Mon, 2012-05-14 at 13:22 +0100, Mark Brown wrote:
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> drivers/regulator/core.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
Acked-by: Liam Girdwood <lrg@ti.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-14 12:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-14 12:22 [PATCH] regulator: core: Don't open code _regulator_is_enabled() Mark Brown
2012-05-14 12:43 ` Liam Girdwood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox