* [PATCH] regulator: core: Check for failed voltage sets before checking for delay
@ 2012-06-26 10:47 Mark Brown
2012-06-26 10:51 ` Axel Lin
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2012-06-26 10:47 UTC (permalink / raw)
To: Liam Girdwood; +Cc: linux-kernel, Axel Lin, Mark Brown
There is no need to consider waiting for the voltage to ramp if we
didn't manage to set it and looking at the return value is going to be
cheaper than is_enabled().
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/regulator/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 531441a..da31b8a 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2123,7 +2123,7 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,
best_val = _regulator_get_voltage(rdev);
/* Call set_voltage_time_sel if successfully obtained old_selector */
- if (_regulator_is_enabled(rdev) && ret == 0 && old_selector >= 0 &&
+ if (ret == 0 && _regulator_is_enabled(rdev) && old_selector >= 0 &&
rdev->desc->ops->set_voltage_time_sel) {
delay = rdev->desc->ops->set_voltage_time_sel(rdev,
--
1.7.10
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: core: Check for failed voltage sets before checking for delay
2012-06-26 10:47 [PATCH] regulator: core: Check for failed voltage sets before checking for delay Mark Brown
@ 2012-06-26 10:51 ` Axel Lin
0 siblings, 0 replies; 2+ messages in thread
From: Axel Lin @ 2012-06-26 10:51 UTC (permalink / raw)
To: Mark Brown; +Cc: Liam Girdwood, linux-kernel
2012/6/26 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> There is no need to consider waiting for the voltage to ramp if we
> didn't manage to set it and looking at the return value is going to be
> cheaper than is_enabled().
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Axel Lin <axel.lin@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-26 10:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-26 10:47 [PATCH] regulator: core: Check for failed voltage sets before checking for delay Mark Brown
2012-06-26 10:51 ` Axel Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®