Skip to content

Commit

Permalink
regulator: palmas: Fix incorrect condition
Browse files Browse the repository at this point in the history
Since 'id' cannot take two values at the same time, the condition
should probably be an OR (||) instead of AND (&&).

Introduced by commit 28d1e8c ("regulator: palma: add ramp delay
support through regulator constraints").

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Sachin Kamat authored and Mark Brown committed May 30, 2013
1 parent e4aa937 commit 3f4d636
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/palmas-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ static int palmas_regulators_probe(struct platform_device *pdev)
break;
}

if ((id == PALMAS_REG_SMPS6) && (id == PALMAS_REG_SMPS8))
if ((id == PALMAS_REG_SMPS6) || (id == PALMAS_REG_SMPS8))
ramp_delay_support = true;

if (ramp_delay_support) {
Expand Down

0 comments on commit 3f4d636

Please sign in to comment.