From 0595ae679fedd856d0ff17220bd5b323fb0dc942 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 1 Aug 2009 23:51:20 +0200 Subject: [PATCH] --- yaml --- r: 156407 b: refs/heads/master c: a1b021d3992d9be03b0abec1a7ed78e713b94206 h: refs/heads/master i: 156405: f6d5a347038d40f378ec168afa6d5d91c357397e 156403: 037498212350c2e7629d3d597af1bb648196f218 156399: 34b3e8c5dcd5b3891ee7f6c434bc69df437e7cdf v: v3 --- [refs] | 2 +- trunk/arch/mips/alchemy/mtx-1/platform.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index feb1fc75f396..63e3b33aa9f5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 619e22632ea3110323b1851a7fecb52bf8505fd2 +refs/heads/master: a1b021d3992d9be03b0abec1a7ed78e713b94206 diff --git a/trunk/arch/mips/alchemy/mtx-1/platform.c b/trunk/arch/mips/alchemy/mtx-1/platform.c index 8b5914d1241f..e30e42add697 100644 --- a/trunk/arch/mips/alchemy/mtx-1/platform.c +++ b/trunk/arch/mips/alchemy/mtx-1/platform.c @@ -1,7 +1,7 @@ /* * MTX-1 platform devices registration * - * Copyright (C) 2007, Florian Fainelli + * Copyright (C) 2007-2009, Florian Fainelli * * 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)); }