MIPS: MTX-1: Request button GPIO before setting its direction
authorFlorian Fainelli <florian@openwrt.org>
Sat, 1 Aug 2009 21:51:20 +0000 (23:51 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 3 Aug 2009 16:52:46 +0000 (17:52 +0100)
commita1b021d3992d9be03b0abec1a7ed78e713b94206
treed6928ff79743aa275d6088f1db5abff6c75fd862
parent619e22632ea3110323b1851a7fecb52bf8505fd2
MIPS: MTX-1: Request button GPIO before setting its direction

This patch fixes the following warning at boot time:
WARNING: at drivers/gpio/gpiolib.c:83 0x8021d5e0()
autorequest GPIO-207
Modules linked in:
Call Trace:[<8011e0ec>] 0x8011e0ec
[<80110a28>] 0x80110a28
[<80110a28>] 0x80110a28
[..snip..]

The current code does not request the GPIO and attempts
to set its direction, which is a violation of the GPIO API.
This patch also unhardcode the GPIO we request and use
the one we defined in the button driver.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/alchemy/mtx-1/platform.c