summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-abx500.c
diff options
context:
space:
mode:
authorAxel Lin2013-03-05 07:58:53 +0100
committerLinus Walleij2013-03-13 19:11:56 +0100
commit6a40cdd5440d7b61a349bc04e85eed4fa7c24a3c (patch)
treefdd255a5d34b36534334757e89cba30968603908 /drivers/pinctrl/pinctrl-abx500.c
parentgpio: fix wrong checking condition for gpio range (diff)
downloadkernel-qcow2-linux-6a40cdd5440d7b61a349bc04e85eed4fa7c24a3c.tar.gz
kernel-qcow2-linux-6a40cdd5440d7b61a349bc04e85eed4fa7c24a3c.tar.xz
kernel-qcow2-linux-6a40cdd5440d7b61a349bc04e85eed4fa7c24a3c.zip
pinctrl: abx500: Fix checking if pin use AlternateFunction register
It's pointless to check "af.alt_bit1 == UNUSED" twice. This looks like a copy-paste bug, I think what we want is to check if *both* af.alt_bit1 and af.alt_bit2 are UNUSED. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Patrice Chotard <patrice.chotard@st.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c
index caecdd373061..c542a97c82f3 100644
--- a/drivers/pinctrl/pinctrl-abx500.c
+++ b/drivers/pinctrl/pinctrl-abx500.c
@@ -422,7 +422,7 @@ static u8 abx500_get_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip,
}
/* check if pin use AlternateFunction register */
- if ((af.alt_bit1 == UNUSED) && (af.alt_bit1 == UNUSED))
+ if ((af.alt_bit1 == UNUSED) && (af.alt_bit2 == UNUSED))
return mode;
/*
* if pin GPIOSEL bit is set and pin supports alternate function,