Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+9 -1
+9 -1
include/linux/of_irq.h
··· 37 37 extern unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data); 38 38 extern int of_irq_to_resource(struct device_node *dev, int index, 39 39 struct resource *r); 40 - extern int of_irq_count(struct device_node *dev); 41 40 extern int of_irq_to_resource_table(struct device_node *dev, 42 41 struct resource *res, int nr_irqs); 43 42 44 43 extern void of_irq_init(const struct of_device_id *matches); 44 + 45 + #ifdef CONFIG_OF_IRQ 46 + extern int of_irq_count(struct device_node *dev); 47 + #else 48 + static inline int of_irq_count(struct device_node *dev) 49 + { 50 + return 0; 51 + } 52 + #endif 45 53 46 54 #if defined(CONFIG_OF) 47 55 /*