summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-abx500.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-08-26 18:03:50 +0200
committerLinus Walleij <linus.walleij@linaro.org>2013-08-28 14:32:06 +0200
commit6da33dbdcb3a07c5987a6ef2bd3f8a45ceef5b4b (patch)
treebd506678b9176ed76841c2e6ae5ae35f7ca8a52e /drivers/pinctrl/pinctrl-abx500.c
parentpinctrl: mvebu: Convert to use devm_ioremap_resource (diff)
downloadlinux-6da33dbdcb3a07c5987a6ef2bd3f8a45ceef5b4b.tar.xz
linux-6da33dbdcb3a07c5987a6ef2bd3f8a45ceef5b4b.zip
pinctrl: abx500: fix bitwise AND test
The intent here was to test if the bit was set or not but there is a logical vs bitwise AND typo so it is true if any bits are set. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-abx500.c')
-rw-r--r--drivers/pinctrl/pinctrl-abx500.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c
index 8f25df06bc6b..4780959e11d4 100644
--- a/drivers/pinctrl/pinctrl-abx500.c
+++ b/drivers/pinctrl/pinctrl-abx500.c
@@ -426,7 +426,7 @@ static int abx500_set_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip,
ret = abx500_gpio_set_bits(chip,
AB8500_GPIO_ALTFUN_REG,
af.alt_bit2,
- !!(af.alta_val && BIT(1)));
+ !!(af.alta_val & BIT(1)));
} else
ret = abx500_gpio_set_bits(chip, AB8500_GPIO_SEL1_REG,
offset, 1);
@@ -447,7 +447,7 @@ static int abx500_set_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip,
ret = abx500_gpio_set_bits(chip,
AB8500_GPIO_ALTFUN_REG,
af.alt_bit2,
- !!(af.altb_val && BIT(1)));
+ !!(af.altb_val & BIT(1)));
break;
case ABX500_ALT_C:
@@ -457,7 +457,7 @@ static int abx500_set_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip,
goto out;
ret = abx500_gpio_set_bits(chip, AB8500_GPIO_ALTFUN_REG,
- af.alt_bit2, !!(af.altc_val && BIT(0)));
+ af.alt_bit2, !!(af.altc_val & BIT(0)));
if (ret < 0)
goto out;