summaryrefslogtreecommitdiff
path: root/include/linux/irqdesc.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-12-10 20:25:37 +0100
committerThomas Gleixner <tglx@linutronix.de>2020-12-15 16:19:30 +0100
commita313357e704f2617f298333e3e617a38b1719760 (patch)
tree8892748e6d35f6d6aa0a60fbc6fac6930ca5083b /include/linux/irqdesc.h
parent3c41e57a1e168d879e923c5583adeae47eec9f64 (diff)
genirq: Move irq_has_action() into core code
This function uses irq_to_desc() and is going to be used by modules to replace the open coded irq_to_desc() (ab)usage. The final goal is to remove the export of irq_to_desc() so driver cannot fiddle with it anymore. Move it into the core code and fixup the usage sites to include the proper header. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20201210194042.548936472@linutronix.de
Diffstat (limited to 'include/linux/irqdesc.h')
-rw-r--r--include/linux/irqdesc.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index 5745491303e0..385a4fafe631 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -179,12 +179,7 @@ int handle_domain_nmi(struct irq_domain *domain, unsigned int hwirq,
/* Test to see if a driver has successfully requested an irq */
static inline int irq_desc_has_action(struct irq_desc *desc)
{
- return desc->action != NULL;
-}
-
-static inline int irq_has_action(unsigned int irq)
-{
- return irq_desc_has_action(irq_to_desc(irq));
+ return desc && desc->action != NULL;
}
/**