All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] gpio: altera_pio: Fix inversed logic of gpio_is_valid() implementation
Date: Sat, 15 Jun 2013 17:10:38 +0800	[thread overview]
Message-ID: <1371287438.4051.2.camel@phoenix> (raw)

The implementation of gpio_is_valid() has inversed logic, fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Hi,
I don't have this hardware to test, but current code looks obviously wrong.
I'd appreciate if someone can review and test this patch.

Axel
 drivers/gpio/altera_pio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/altera_pio.c b/drivers/gpio/altera_pio.c
index fb03760..7ab6df8 100644
--- a/drivers/gpio/altera_pio.c
+++ b/drivers/gpio/altera_pio.c
@@ -294,6 +294,6 @@ int gpio_is_valid(int number)
 	int gidx = altera_pio_gidx(number);
 
 	if (gidx < 0)
-		return 1;
-	return 0;
+		return 0;
+	return 1;
 }
-- 
1.8.1.2

             reply	other threads:[~2013-06-15  9:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-15  9:10 Axel Lin [this message]
2013-07-29  9:16 ` [U-Boot] [PATCH] gpio: altera_pio: Fix inversed logic of gpio_is_valid() implementation Albert ARIBAUD
2013-08-05  0:26   ` Axel Lin

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=1371287438.4051.2.camel@phoenix \
    --to=axel.lin@ingics.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.