Patchwork [2/2] ata: Don't use NO_IRQ in pata_of_platform driver

login
register
mail settings
Submitter Anton Vorontsov
Date Nov. 10, 2011, 3:26 p.m.
Message ID <20111110152606.GB3207@oksana.dev.rtsoft.ru>
Download mbox | patch
Permalink /patch/124907/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Anton Vorontsov - Nov. 10, 2011, 3:26 p.m.
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 <cbouatmailru@gmail.com>
---
 drivers/ata/pata_of_platform.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
Alan Cox - Nov. 10, 2011, 3:38 p.m.
On Thu, 10 Nov 2011 19:26:06 +0400
Anton Vorontsov <cbouatmailru@gmail.com> wrote:

> 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 <cbouatmailru@gmail.com>

Acked-by: Alan Cox <alan@linux.intel.com>

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
index f99e17b..2a472c5 100644
--- a/drivers/ata/pata_of_platform.c
+++ b/drivers/ata/pata_of_platform.c
@@ -16,11 +16,6 @@ 
 #include <linux/of_platform.h>
 #include <linux/ata_platform.h>
 
-/* For archs that don't support NO_IRQ (such as x86), provide a dummy value */
-#ifndef NO_IRQ
-#define NO_IRQ 0
-#endif
-
 static int __devinit pata_of_platform_probe(struct platform_device *ofdev)
 {
 	int ret;
@@ -57,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;