linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Russell King <linux@armlinux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>, Lee Jones <lee.jones@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] mfd: ucb1x00: remove NO_IRQ check
Date: Tue,  6 Sep 2016 15:53:29 +0200	[thread overview]
Message-ID: <20160906135637.2622666-3-arnd@arndb.de> (raw)
In-Reply-To: <20160906135637.2622666-1-arnd@arndb.de>

probe_irq_off() returns '0' on failure, not NO_IRQ, so the check
in this driver is clearly wrong. This replaces it with the
regular '!irq' check used in other drivers.

The sa1100 platform that this driver is used on originally numbered
all its interrupts starting at '0', which would have conflicted with
this change, but as of commit 18f3aec ("ARM: 8230/1: sa1100: shift
IRQs by one"), this is not a problem any more.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/mfd/ucb1x00-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
index 48bea5038654..d6fb2e1a759a 100644
--- a/drivers/mfd/ucb1x00-core.c
+++ b/drivers/mfd/ucb1x00-core.c
@@ -537,7 +537,7 @@ static int ucb1x00_probe(struct mcp *mcp)
 	ucb1x00_enable(ucb);
 	ucb->irq = ucb1x00_detect_irq(ucb);
 	ucb1x00_disable(ucb);
-	if (ucb->irq == NO_IRQ) {
+	if (!ucb->irq) {
 		dev_err(&ucb->dev, "IRQ probe failed\n");
 		ret = -ENODEV;
 		goto err_no_irq;
-- 
2.9.0

  parent reply	other threads:[~2016-09-06 13:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 13:53 [PATCH 1/4] ARM: common/sa1111: remove NO_IRQ check Arnd Bergmann
2016-09-06 13:53 ` [PATCH 2/4] ARM: common/locomo: " Arnd Bergmann
2016-09-06 14:21   ` Russell King - ARM Linux
2016-09-06 14:50     ` Arnd Bergmann
2016-09-06 15:20       ` [PATCH v2] " Arnd Bergmann
2016-09-06 13:53 ` Arnd Bergmann [this message]
2016-09-07 11:24   ` [PATCH 3/4] mfd: ucb1x00: " Lee Jones
2016-09-06 13:53 ` [PATCH 4/4] pcmcia: soc-common: remove incorrect NO_IRQ use Arnd Bergmann
2016-09-06 14:14 ` [PATCH 1/4] ARM: common/sa1111: remove NO_IRQ check Russell King - ARM Linux

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=20160906135637.2622666-3-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=tglx@linutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).