]> git.karo-electronics.de Git - linux-beck.git/commitdiff
regulator: palmas: Fix incorrect condition
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 8 May 2013 10:39:06 +0000 (16:09 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 30 May 2013 10:55:46 +0000 (11:55 +0100)
Since 'id' cannot take two values at the same time, the condition
should probably be an OR (||) instead of AND (&&).

Introduced by commit 28d1e8cd67 ("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>
drivers/regulator/palmas-regulator.c

index 92ceed0fc65e780216861143c8ccc25f9c16fa53..ced74167a60095066ec7a58ee3bf2f861cea3de2 100644 (file)
@@ -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) {