diff mbox

[v3,36/36] genirq: Optimize irq_data_to_desc() to avoid irq_to_desc() lookup

Message ID 1433145945-789-37-git-send-email-jiang.liu@linux.intel.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Jiang Liu June 1, 2015, 8:05 a.m. UTC
Optimize irq_data_to_desc() to avoid irq_to_desc() lookup.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
 include/linux/irqdesc.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index 4dfa46b99a14..749755bffbc1 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -97,7 +97,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);
+	return container_of(data->common, struct irq_desc, irq_common_data);
 #else
 	return container_of(data, struct irq_desc, irq_data);
 #endif