Skip to content

Commit

Permalink
genirq: Simplify irq_data_to_desc()
Browse files Browse the repository at this point in the history
Avoid the lookup of irq_desc and use the same mechanism for
hierarchical and flat irqdomains.

Based-on-a-patch-from: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner committed Sep 16, 2015
1 parent 123236c commit 755d119
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions include/linux/irqdesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,7 @@ extern struct irq_desc irq_desc[NR_IRQS];

static inline struct irq_desc *irq_data_to_desc(struct irq_data *data)
{
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
return irq_to_desc(data->irq);
#else
return container_of(data, struct irq_desc, irq_data);
#endif
return container_of(data->common, struct irq_desc, irq_common_data);
}

static inline unsigned int irq_desc_get_irq(struct irq_desc *desc)
Expand Down

0 comments on commit 755d119

Please sign in to comment.