diff options
author | Rob Herring <rob.herring@calxeda.com> | 2013-11-07 12:13:27 -0600 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2013-11-08 10:47:28 -0600 |
commit | a8d3f362f52b65207cacbfb4c50f75e9d4751ef6 (patch) | |
tree | fcb167a3ca87210938c12a9c29bab3876b0696f1 /include/linux/of_irq.h | |
parent | f5ae18ece391c3bbf03bb1edc5fdcf23dc8b7e54 (diff) |
dt/irq: add empty of_irq_count for !OF_IRQ
Add an empty version of of_irq_count for !OF_IRQ. This fixes build error
on sparc in linux-next:
drivers/gpio/gpio-bcm-kona.c:542: undefined reference to `of_irq_count'
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'include/linux/of_irq.h')
-rw-r--r-- | include/linux/of_irq.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index c0d6dfe8089..3f23b4472c3 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h @@ -37,12 +37,20 @@ 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_count(struct device_node *dev); 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); +#ifdef CONFIG_OF_IRQ +extern int of_irq_count(struct device_node *dev); +#else +static inline int of_irq_count(struct device_node *dev) +{ + return 0; +} +#endif + #if defined(CONFIG_OF) /* * irq_of_parse_and_map() is used by all OF enabled platforms; but SPARC |