* [PATCH RFT] pinctrl: abx500: Fix checking if pin use AlternateFunction register
@ 2013-03-05 6:58 Axel Lin
2013-03-13 13:59 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2013-03-05 6:58 UTC (permalink / raw)
To: Linus Walleij; +Cc: Lee Jones, linux-kernel
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>
---
Hi,
I don't have the datasheet and hw.
I'd appreciate if someone can review and test this patch.
Thanks,
Axel
drivers/pinctrl/pinctrl-abx500.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c
index e8abc3c..0cf3fa4 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,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RFT] pinctrl: abx500: Fix checking if pin use AlternateFunction register
2013-03-05 6:58 [PATCH RFT] pinctrl: abx500: Fix checking if pin use AlternateFunction register Axel Lin
@ 2013-03-13 13:59 ` Linus Walleij
2013-03-13 14:33 ` Patrice CHOTARD
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2013-03-13 13:59 UTC (permalink / raw)
To: Axel Lin; +Cc: Lee Jones, linux-kernel, Patrice CHOTARD
On Tue, Mar 5, 2013 at 7:58 AM, Axel Lin <axel.lin@ingics.com> wrote:
> 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>
Tentatively applied to fixes, waiting for Patrice to confirm...
Thanks!
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RFT] pinctrl: abx500: Fix checking if pin use AlternateFunction register
2013-03-13 13:59 ` Linus Walleij
@ 2013-03-13 14:33 ` Patrice CHOTARD
0 siblings, 0 replies; 3+ messages in thread
From: Patrice CHOTARD @ 2013-03-13 14:33 UTC (permalink / raw)
To: Linus Walleij; +Cc: Axel Lin, Lee Jones, linux-kernel
On 03/13/2013 02:59 PM, Linus Walleij wrote:
> On Tue, Mar 5, 2013 at 7:58 AM, Axel Lin <axel.lin@ingics.com> wrote:
>
>> 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>
>
> Tentatively applied to fixes, waiting for Patrice to confirm...
>
> Thanks!
> Linus Walleij
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Patrice
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-13 14:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-05 6:58 [PATCH RFT] pinctrl: abx500: Fix checking if pin use AlternateFunction register Axel Lin
2013-03-13 13:59 ` Linus Walleij
2013-03-13 14:33 ` Patrice CHOTARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).