summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2015-04-05 16:59:25 +0200
committerRob Herring <robh@kernel.org>2015-04-14 19:23:24 -0500
commitd616a703a52cf972425cddd43fc01cd4ef867faf (patch)
tree1c5355cd587ab83b238df5e76d64c60ec26a2ada
parent63c60e3a6dc3eca53714e8a1784c985a552bc5cd (diff)
of: Add dummy of_irq_to_resource_table() for IRQ_OF=n
If CONFIG_IRQ_OF=n: drivers/built-in.o: In function `of_device_alloc': (.text+0x72bce): undefined reference to `of_irq_to_resource_table' make: *** [vmlinux] Error 1 of_device_alloc() calls of_irq_to_resource_table() with nr_irqs = 0 due to of_irq_count() already being a dummy, so just add a dummy for of_irq_to_resource_table(), too. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Rob Herring <robh@kernel.org>
-rw-r--r--include/linux/of_irq.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index bfec136a6d1e..d884929a7747 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -37,8 +37,6 @@ extern int of_irq_parse_one(struct device_node *device, int index,
extern unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data);
extern int of_irq_to_resource(struct device_node *dev, int index,
struct resource *r);
-extern int of_irq_to_resource_table(struct device_node *dev,
- struct resource *res, int nr_irqs);
extern void of_irq_init(const struct of_device_id *matches);
@@ -46,6 +44,8 @@ extern void of_irq_init(const struct of_device_id *matches);
extern int of_irq_count(struct device_node *dev);
extern int of_irq_get(struct device_node *dev, int index);
extern int of_irq_get_byname(struct device_node *dev, const char *name);
+extern int of_irq_to_resource_table(struct device_node *dev,
+ struct resource *res, int nr_irqs);
#else
static inline int of_irq_count(struct device_node *dev)
{
@@ -59,6 +59,11 @@ static inline int of_irq_get_byname(struct device_node *dev, const char *name)
{
return 0;
}
+static inline int of_irq_to_resource_table(struct device_node *dev,
+ struct resource *res, int nr_irqs)
+{
+ return 0;
+}
#endif
#if defined(CONFIG_OF)