lkml.org 
[lkml]   [2011]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] of: define NO_IRQ globally when not supplied by the architecture
Date
Since the application of the commit below the PATA OF platform driver
may now be built on x86 systems:

ata: Make pata_of_platform.c compile again and work on non-PPC platforms

This leads to the following build failure on 32bit x86 builds:

.../drivers/ata/pata_of_platform.c: In function 'pata_of_platform_probe':
.../drivers/ata/pata_of_platform.c:55: error: 'NO_IRQ' undeclared
(first use in this function)

This occurs because x86 does not supply a definition for NO_IRQ.
However if we examine drivers/of/irq.c we already supply a default value
for NO_IRQ where not specified by the architecture. Fix the build failure
by pulling this default value up to include/linux/of_irq.h.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
drivers/of/irq.c | 5 -----
include/linux/of_irq.h | 5 +++++
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 6d3dd39..0208e27 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -26,11 +26,6 @@
#include <linux/string.h>
#include <linux/slab.h>

-/* For archs that don't support NO_IRQ (such as x86), provide a dummy value */
-#ifndef NO_IRQ
-#define NO_IRQ 0
-#endif
-
/**
* irq_of_parse_and_map - Parse and map an interrupt into linux virq space
* @device: Device node of the device whose interrupt is to be mapped
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index d0307ee..8b2369f 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -77,6 +77,11 @@ extern struct device_node *of_irq_find_parent(struct device_node *child);

extern void of_irq_init(const struct of_device_id *matches);

+/* For archs that don't support NO_IRQ (such as x86), provide a dummy value */
+#ifndef NO_IRQ
+#define NO_IRQ 0
+#endif
+
#endif /* CONFIG_OF_IRQ */
#endif /* CONFIG_OF */
#endif /* __OF_IRQ_H */
--
1.7.5.4


\
 
 \ /
  Last update: 2011-11-08 12:47    [W:0.039 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site