diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-08-26 12:03:50 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-08-28 08:32:06 -0400 |
commit | 6da33dbdcb3a07c5987a6ef2bd3f8a45ceef5b4b (patch) | |
tree | bd506678b9176ed76841c2e6ae5ae35f7ca8a52e /drivers/pinctrl | |
parent | a8a364bd27cc35c0c879ba4164c4757fa634a58d (diff) |
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')
-rw-r--r-- | drivers/pinctrl/pinctrl-abx500.c | 6 |
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, | |||
426 | ret = abx500_gpio_set_bits(chip, | 426 | ret = abx500_gpio_set_bits(chip, |
427 | AB8500_GPIO_ALTFUN_REG, | 427 | AB8500_GPIO_ALTFUN_REG, |
428 | af.alt_bit2, | 428 | af.alt_bit2, |
429 | !!(af.alta_val && BIT(1))); | 429 | !!(af.alta_val & BIT(1))); |
430 | } else | 430 | } else |
431 | ret = abx500_gpio_set_bits(chip, AB8500_GPIO_SEL1_REG, | 431 | ret = abx500_gpio_set_bits(chip, AB8500_GPIO_SEL1_REG, |
432 | offset, 1); | 432 | offset, 1); |
@@ -447,7 +447,7 @@ static int abx500_set_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip, | |||
447 | ret = abx500_gpio_set_bits(chip, | 447 | ret = abx500_gpio_set_bits(chip, |
448 | AB8500_GPIO_ALTFUN_REG, | 448 | AB8500_GPIO_ALTFUN_REG, |
449 | af.alt_bit2, | 449 | af.alt_bit2, |
450 | !!(af.altb_val && BIT(1))); | 450 | !!(af.altb_val & BIT(1))); |
451 | break; | 451 | break; |
452 | 452 | ||
453 | case ABX500_ALT_C: | 453 | case ABX500_ALT_C: |
@@ -457,7 +457,7 @@ static int abx500_set_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip, | |||
457 | goto out; | 457 | goto out; |
458 | 458 | ||
459 | ret = abx500_gpio_set_bits(chip, AB8500_GPIO_ALTFUN_REG, | 459 | ret = abx500_gpio_set_bits(chip, AB8500_GPIO_ALTFUN_REG, |
460 | af.alt_bit2, !!(af.altc_val && BIT(0))); | 460 | af.alt_bit2, !!(af.altc_val & BIT(0))); |
461 | if (ret < 0) | 461 | if (ret < 0) |
462 | goto out; | 462 | goto out; |
463 | 463 | ||