mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH v2 5/5] animeo_ip: use gpio_request_input()
Date: Fri,  1 Feb 2013 01:46:36 +0400	[thread overview]
Message-ID: <1359668796-22835-6-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1359668796-22835-1-git-send-email-antonynpavlov@gmail.com>

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 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

      parent reply	other threads:[~2013-01-31 21:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31 21:46 [PATCH v2 0/5] gpiolib: add gpio_request_{in,out}put support Antony Pavlov
2013-01-31 21:46 ` [PATCH v2 1/5] gpiolib: fix whitespaces Antony Pavlov
2013-01-31 21:46 ` [PATCH v2 2/5] gpiolib: add gpio_request_{in,out}put support Antony Pavlov
2013-01-31 21:46 ` [PATCH v2 3/5] gpiolib: gpio_request(): add error message Antony Pavlov
2013-02-01  8:13   ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-01 18:09     ` Antony Pavlov
2013-02-01 18:24       ` Jean-Christophe PLAGNIOL-VILLARD
2013-01-31 21:46 ` [PATCH v2 4/5] at91sam9*: use gpio_request_output() Antony Pavlov
2013-01-31 21:46 ` Antony Pavlov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1359668796-22835-6-git-send-email-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox