[tip:irq/urgent] genirq: Introduce helper irq_desc_get_irq()
From: tip-bot for Jiang Liu
Date: Fri Jun 26 2015 - 15:56:23 EST
Commit-ID: 304adf8a8fff972f633bf52b3d160682d3f3d5d2
Gitweb: http://git.kernel.org/tip/304adf8a8fff972f633bf52b3d160682d3f3d5d2
Author: Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>
AuthorDate: Thu, 4 Jun 2015 12:13:26 +0800
Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CommitDate: Fri, 26 Jun 2015 21:28:32 +0200
genirq: Introduce helper irq_desc_get_irq()
Introduce helper irq_desc_get_irq() to retrieve the irq number from
the irq descriptor.
Signed-off-by: Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Cc: Tony Luck <tony.luck@xxxxxxxxx>
Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Yinghai Lu <yinghai@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: Marc Zyngier <marc.zyngier@xxxxxxx>
Link: http://lkml.kernel.org/r/1433391238-19471-17-git-send-email-jiang.liu@xxxxxxxxxxxxxxx
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
include/linux/irqdesc.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index 66c41b4..a72bfd9 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -100,6 +100,11 @@ static inline struct irq_desc *irq_data_to_desc(struct irq_data *data)
#endif
}
+static inline unsigned int irq_desc_get_irq(struct irq_desc *desc)
+{
+ return desc->irq_data.irq;
+}
+
static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc)
{
return &desc->irq_data;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/