Skip to content

Commit

Permalink
dt/irq: add empty of_irq_count for !OF_IRQ
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rob Herring committed Nov 8, 2013
1 parent f5ae18e commit a8d3f36
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion include/linux/of_irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a8d3f36

Please sign in to comment.