diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-08-05 23:56:54 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2009-08-05 23:56:54 +0200 |
commit | c00aafcd4977769e8728292302ddbbb8b1082fab (patch) | |
tree | 5766bcfbfd7b24816b54298b8ef34054f8cf0fae /arch/mips/alchemy/mtx-1/platform.c | |
parent | 2e6713c7662cc5ebc7346b033c404cb2f708fd51 (diff) | |
parent | 90bc1a658a53f8832ee799685703977a450e5af9 (diff) |
Merge branch 'master' into for-linus
Diffstat (limited to 'arch/mips/alchemy/mtx-1/platform.c')
-rw-r--r-- | arch/mips/alchemy/mtx-1/platform.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/mips/alchemy/mtx-1/platform.c b/arch/mips/alchemy/mtx-1/platform.c index 8b5914d1241..e30e42add69 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)); } |