mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-05 16:34:04 +02:00
8cc6d2b625
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21959 3c298f89-4303-0410-b956-a3cf2f4a3e73
31 lines
905 B
Diff
31 lines
905 B
Diff
--- 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));
|
|
}
|
|
|