[MIPS] au1000: Make sure GPIO value is zero or one
authorBruno Randolf <br1@einfach.org>
Thu, 25 Sep 2008 14:45:10 +0000 (16:45 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 27 Sep 2008 14:45:35 +0000 (15:45 +0100)
commit19506fc51852e859bb08ab5abbdb8fd02b7392f2
tree9c6352c3de58feb9651d4488232db81b6ac231c7
parent6ef190cc92e33565accff6a320f0e7d90480bfe7
[MIPS] au1000: Make sure GPIO value is zero or one

David Brownell <david-b@pacbell.net> wrote:
>       The problem is that "value" is zero-or-nonzero.
>       This code wrongly assumes it's zero-or-one.
>       Possible fix:  "((!!value) << gpio)".

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/au1000/common/gpio.c