[package] base-files: add "mtu" option for route sections, allows setting per-route...
[openwrt.git] / target / linux / au1000 / patches-2.6.30 / 007-gpio_request_button.patch
1 --- a/arch/mips/alchemy/mtx-1/platform.c
2 +++ b/arch/mips/alchemy/mtx-1/platform.c
3 @@ -1,7 +1,7 @@
4 /*
5 * MTX-1 platform devices registration
6 *
7 - * Copyright (C) 2007, Florian Fainelli <florian@openwrt.org>
8 + * Copyright (C) 2007-2009, Florian Fainelli <florian@openwrt.org>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 @@ -142,7 +142,17 @@ static struct __initdata platform_device
13
14 static int __init mtx1_register_devices(void)
15 {
16 - gpio_direction_input(207);
17 + int rc;
18 +
19 + rc = gpio_request(mtx1_gpio_button[0].gpio,
20 + mtx1_gpio_button[0].desc);
21 + if (rc < 0) {
22 + printk(KERN_INFO "mtx1: failed to request %d\n",
23 + mtx1_gpio_button[0].gpio);
24 + goto out;
25 + }
26 + gpio_direction_input(mtx1_gpio_button[0].gpio);
27 +out:
28 return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs));
29 }
30
This page took 0.0477 seconds and 5 git commands to generate.