[PATCH] regulator: Fix machine constraints apply for min_uV != max_uV

From: Jarkko Nikula
Date: Fri Sep 03 2010 - 09:43:37 EST


Constraints are not applied until both min_uV and max_uV are the same. This
looks like a typo in the test.

Signed-off-by: Jarkko Nikula <jhnikula@xxxxxxxxx>
---
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 422a709..b092070 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -724,7 +724,7 @@ static int machine_constraints_voltage(struct regulator_dev *rdev,

/* do we need to apply the constraint voltage */
if (rdev->constraints->apply_uV &&
- rdev->constraints->min_uV == rdev->constraints->max_uV &&
+ rdev->constraints->min_uV && rdev->constraints->max_uV &&
ops->set_voltage) {
ret = ops->set_voltage(rdev,
rdev->constraints->min_uV, rdev->constraints->max_uV);
--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/