genirq: Simplify irq_data_to_desc()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 16 Sep 2015 12:37:12 +0000 (14:37 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 16 Sep 2015 13:43:11 +0000 (15:43 +0200)
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>
include/linux/irqdesc.h

index dce395cd67ded1a6a24441ec836fa7cd85de1693..1fc5304641a131fd0541054f0931e361f90cf1ad 100644 (file)
@@ -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)