diff options
author | Florian Fainelli <florian@openwrt.org> | 2010-06-26 22:18:23 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2010-06-26 22:18:23 +0000 |
commit | f394178e15e9fe590e664ddce6a730bcecd97ad1 (patch) | |
tree | 5a65e07f0cce0d779bff0368a76a6ca305875528 /target/linux/au1000/patches-2.6.30/007-gpio_request_button.patch | |
parent | 27fc94ff525dc76b8afc485f50b9378bee229eef (diff) | |
download | mtk-20170518-f394178e15e9fe590e664ddce6a730bcecd97ad1.zip mtk-20170518-f394178e15e9fe590e664ddce6a730bcecd97ad1.tar.gz mtk-20170518-f394178e15e9fe590e664ddce6a730bcecd97ad1.tar.bz2 |
reinstate 2.6.30 support until 2.6.32 is fixed
SVN-Revision: 21959
Diffstat (limited to 'target/linux/au1000/patches-2.6.30/007-gpio_request_button.patch')
-rw-r--r-- | target/linux/au1000/patches-2.6.30/007-gpio_request_button.patch | 30 |
1 files changed, 30 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 0000000..c0c6a22 --- /dev/null +++ b/target/linux/au1000/patches-2.6.30/007-gpio_request_button.patch @@ -0,0 +1,30 @@ +--- 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 + + 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)); + } + |