Thread (58 messages) 58 messages, 15 authors, 2011-12-07
STALE5312d REVIEWED: 1 (0M)

[PATCH] ata: Don't use NO_IRQ in pata_of_platform driver

From: Anton Vorontsov <hidden>
Date: 2011-11-10 16:29:08
Also in: linux-ide, linux-next, lkml
Subsystem: libata subsystem (serial and parallel ata drivers), the rest · Maintainers: Damien Le Moal, Niklas Cassel, Linus Torvalds

Drivers should not use NO_IRQ; moreover, some architectures don't
have it nowadays. '0' is the 'no irq' case.

Signed-off-by: Anton Vorontsov <redacted>
Acked-by: Alan Cox <redacted>
---

On Thu, Nov 10, 2011 at 03:38:16PM +0000, Alan Cox wrote:
On Thu, 10 Nov 2011 19:26:06 +0400
Anton Vorontsov [off-list ref] wrote:
quoted
Drivers should not use NO_IRQ; moreover, some architectures don't
have it nowadays. '0' is the 'no irq' case.

Signed-off-by: Anton Vorontsov <redacted>
Acked-by: Alan Cox <redacted>
In case if we don't want a "band-aid fix" for 3.2, here is the patch
that just does the proper fix (w/ a risk to break minor architectures).

 drivers/ata/pata_of_platform.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
index a72ab0d..2a472c5 100644
--- a/drivers/ata/pata_of_platform.c
+++ b/drivers/ata/pata_of_platform.c
@@ -52,7 +52,7 @@ static int __devinit pata_of_platform_probe(struct platform_device *ofdev)
 	}
 
 	ret = of_irq_to_resource(dn, 0, &irq_res);
-	if (ret == NO_IRQ)
+	if (!ret)
 		irq_res.start = irq_res.end = 0;
 	else
 		irq_res.flags = 0;
-- 
1.7.5.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help