aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/au1000
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2009-08-01 21:36:22 +0000
committerFlorian Fainelli <florian@openwrt.org>2009-08-01 21:36:22 +0000
commit0f5258d36183fb253eb8a524fea82c77efb9a9fc (patch)
tree5c1a0581eabf35ad22cfe7bb09a1a495e55afdc6 /target/linux/au1000
parent00c98668ab7ab096d5e9db9d558309173f642da0 (diff)
downloadupstream-0f5258d36183fb253eb8a524fea82c77efb9a9fc.tar.gz
upstream-0f5258d36183fb253eb8a524fea82c77efb9a9fc.tar.bz2
upstream-0f5258d36183fb253eb8a524fea82c77efb9a9fc.zip
[au1000] prevent error messages on the requesting of the GPIO buttons
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17088 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/au1000')
-rw-r--r--target/linux/au1000/patches-2.6.30/007-gpio_request_button.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/target/linux/au1000/patches-2.6.30/007-gpio_request_button.patch b/target/linux/au1000/patches-2.6.30/007-gpio_request_button.patch
new file mode 100644
index 0000000000..1e09b1987f
--- /dev/null
+++ b/target/linux/au1000/patches-2.6.30/007-gpio_request_button.patch
@@ -0,0 +1,32 @@
+diff --git a/arch/mips/alchemy/mtx-1/platform.c b/arch/mips/alchemy/mtx-1/platform.c
+index 8b5914d..e30e42a 100644
+--- a/arch/mips/alchemy/mtx-1/platform.c
++++ b/arch/mips/alchemy/mtx-1/platform.c
+@@ -1,7 +1,7 @@
+ /*
+ * MTX-1 platform devices registration
+ *
+- * Copyright (C) 2007, Florian Fainelli <florian@openwrt.org>
++ * Copyright (C) 2007-2009, Florian Fainelli <florian@openwrt.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -142,7 +142,17 @@ static struct __initdata platform_device * mtx1_devs[] = {
+
+ static int __init mtx1_register_devices(void)
+ {
+- gpio_direction_input(207);
++ int rc;
++
++ rc = gpio_request(mtx1_gpio_button[0].gpio,
++ mtx1_gpio_button[0].desc);
++ if (rc < 0) {
++ printk(KERN_INFO "mtx1: failed to request %d\n",
++ mtx1_gpio_button[0].gpio);
++ goto out;
++ }
++ gpio_direction_input(mtx1_gpio_button[0].gpio);
++out:
+ return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs));
+ }
+