linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: ucb1x00: remove NO_IRQ check
@ 2016-09-06 13:03 Arnd Bergmann
  2016-09-06 13:17 ` Russell King - ARM Linux
  0 siblings, 1 reply; 16+ messages in thread
From: Arnd Bergmann @ 2016-09-06 13:03 UTC (permalink / raw)
  To: Lee Jones
  Cc: Arnd Bergmann, Linus Walleij, Hans-Christian Egtvedt,
	Dmitry Torokhov, Thomas Gleixner, Russell King, linux-kernel

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-09-14 19:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-06 13:03 [PATCH] mfd: ucb1x00: remove NO_IRQ check Arnd Bergmann
2016-09-06 13:17 ` Russell King - ARM Linux
2016-09-06 13:49   ` Arnd Bergmann
2016-09-06 15:45   ` Lee Jones
2016-09-06 16:28     ` Russell King - ARM Linux
2016-09-07 10:27       ` Lee Jones
2016-09-07 11:27         ` Russell King - ARM Linux
2016-09-07 12:48           ` Lee Jones
2016-09-07 13:44             ` Russell King - ARM Linux
2016-09-07 15:08               ` Lee Jones
2016-09-07 16:07                 ` Russell King - ARM Linux
2016-09-07 16:27                   ` Lee Jones
2016-09-07 16:36                     ` Russell King - ARM Linux
     [not found]                     ` <1473265954.29864.15.camel@perches.com>
     [not found]                       ` <20160907163854.GE4921@dell>
2016-09-07 19:47                         ` rfc: Updating SubmittingPatches with [RFC PATCH] and/or [WIP PATCH] Joe Perches
2016-09-07 21:49                           ` Randy Dunlap
2016-09-14 19:03                           ` Jonathan Corbet

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).