* [PATCH v2] regulator: core: Update regulator_is_supported_voltage for fixed voltages
@ 2012-11-14 3:54 Tushar Behera
2012-11-14 4:12 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Tushar Behera @ 2012-11-14 3:54 UTC (permalink / raw)
To: linux-kernel; +Cc: broonie, patches
Commit c5f3939b8fe0 ("regulator: core: Support fixed voltages in
regulator_is_supported_voltage()") returns success when the regulator
voltage is less than both min_uV and max_uV. Modify this to return
success only when the regulator voltage is within the specified range.
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
Changes since v1:
* Return success when the regulator voltage is within the
specified range.
drivers/regulator/core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 1a35251..e90e5c3 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1974,7 +1974,7 @@ int regulator_is_supported_voltage(struct regulator *regulator,
if (!(rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE)) {
ret = regulator_get_voltage(regulator);
if (ret >= 0)
- return (min_uV >= ret && ret <= max_uV);
+ return (ret >= min_uV && ret <= max_uV);
else
return ret;
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] regulator: core: Update regulator_is_supported_voltage for fixed voltages
2012-11-14 3:54 [PATCH v2] regulator: core: Update regulator_is_supported_voltage for fixed voltages Tushar Behera
@ 2012-11-14 4:12 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-11-14 4:12 UTC (permalink / raw)
To: Tushar Behera; +Cc: linux-kernel, patches
[-- Attachment #1: Type: text/plain, Size: 395 bytes --]
On Wed, Nov 14, 2012 at 09:24:26AM +0530, Tushar Behera wrote:
> Commit c5f3939b8fe0 ("regulator: core: Support fixed voltages in
> regulator_is_supported_voltage()") returns success when the regulator
> voltage is less than both min_uV and max_uV. Modify this to return
> success only when the regulator voltage is within the specified range.
I applied a version of this from Marek yesterday.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-14 4:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-14 3:54 [PATCH v2] regulator: core: Update regulator_is_supported_voltage for fixed voltages Tushar Behera
2012-11-14 4:12 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.