From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-lb0-f174.google.com ([209.85.217.174]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U0zdY-0001rH-A7 for barebox@lists.infradead.org; Thu, 31 Jan 2013 19:17:29 +0000 Received: by mail-lb0-f174.google.com with SMTP id l12so3759544lbo.19 for ; Thu, 31 Jan 2013 11:17:26 -0800 (PST) From: Antony Pavlov Date: Thu, 31 Jan 2013 23:29:27 +0400 Message-Id: <1359660567-12220-5-git-send-email-antonynpavlov@gmail.com> In-Reply-To: <1359660567-12220-1-git-send-email-antonynpavlov@gmail.com> References: <1359660567-12220-1-git-send-email-antonynpavlov@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 4/4] animeo_ip: use gpio_request_input() To: barebox@lists.infradead.org Signed-off-by: Antony Pavlov --- arch/arm/boards/animeo_ip/init.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/arch/arm/boards/animeo_ip/init.c b/arch/arm/boards/animeo_ip/init.c index ada3bb0..a5062f1 100644 --- a/arch/arm/boards/animeo_ip/init.c +++ b/arch/arm/boards/animeo_ip/init.c @@ -33,20 +33,9 @@ static int animeo_ip_get_pio_revision(int gpio, char *name) { int ret; - ret = gpio_request(gpio, name); - if (ret) { - pr_err("animeo_ip: can not request gpio %d as %s (%d)\n", - gpio, name, ret); + ret = gpio_request_input(gpio, name); + if (ret) return ret; - } - - ret = gpio_direction_input(gpio); - - if (ret) { - pr_err("animeo_ip: can configure gpio %d (%s) as input (%d)\n", - gpio, name, ret); - return ret; - } return gpio_get_value(gpio); } -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox