From: Silvio Fricke <silvio.fricke@gmail.com>
To: barebox@lists.infradead.org
Cc: Silvio Fricke <silvio.fricke@gmail.com>
Subject: [PATCH] gpiolib: gpio_request: correct return code of a already requested gpio
Date: Tue, 16 Sep 2014 14:15:11 +0200 [thread overview]
Message-ID: <0d3183ff039cb1eccb72299690544cb34299bf4e.1410868272.git.silvio.fricke@gmail.com> (raw)
In-Reply-To: <cover.1410868272.git.silvio.fricke@gmail.com>
In-Reply-To: <cover.1410868272.git.silvio.fricke@gmail.com>
Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
---
drivers/gpio/gpiolib.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 611e41e..3370438 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -55,10 +55,8 @@ int gpio_request(unsigned gpio, const char *label)
goto done;
}
- if (gi->requested) {
- ret = -EBUSY;
- goto done;
- }
+ if (gi->requested)
+ return 0;
ret = 0;
--
2.1.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-09-16 12:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 12:15 [PATCH] double requested gpio problem Silvio Fricke
2014-09-16 12:15 ` Silvio Fricke [this message]
2014-09-17 6:32 ` [PATCH] gpio phy-reset problem Silvio Fricke
2014-09-17 6:33 ` [PATCH] ARM: i.MX: edmqmx6: free phy-reset gpio pin Silvio Fricke
2014-09-17 7:11 ` Sascha Hauer
2014-09-17 7:17 ` Alexander Shiyan
2014-09-22 4:57 ` Sascha Hauer
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=0d3183ff039cb1eccb72299690544cb34299bf4e.1410868272.git.silvio.fricke@gmail.com \
--to=silvio.fricke@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