From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.data-modul.de ([212.184.205.171] helo=mailgw1.data-modul.com) by bombadil.infradead.org with smtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XTrfl-0007hp-PD for barebox@lists.infradead.org; Tue, 16 Sep 2014 12:15:54 +0000 From: Silvio Fricke Date: Tue, 16 Sep 2014 14:15:11 +0200 Message-Id: <0d3183ff039cb1eccb72299690544cb34299bf4e.1410868272.git.silvio.fricke@gmail.com> In-Reply-To: References: In-Reply-To: References: 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" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] gpiolib: gpio_request: correct return code of a already requested gpio To: barebox@lists.infradead.org Cc: Silvio Fricke Signed-off-by: Silvio Fricke --- 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