summaryrefslogtreecommitdiffstats
path: root/kernel/irq/manage.c
diff options
context:
space:
mode:
authorUwe Kleine König <u.kleine-koenig@pengutronix.de>2018-03-19 06:52:02 -0400
committerThomas Gleixner <tglx@linutronix.de>2018-03-20 03:52:44 -0400
commit83ac4ca943affce56a2c408ddb2f5232f478fb11 (patch)
treecff6f9602d3c4b24841e45f325a2d136c40e378c /kernel/irq/manage.c
parentcc6c98485f8e61fb3d6c51821fc75384e5a3a9c3 (diff)
genirq: Pass desc to __irq_free instead of irq number
Given that irq_to_desc() is a radix_tree_lookup and the reverse operation is only a pointer dereference and that all callers of __free_irq already have the desc, pass the desc instead of the irq number. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: kernel@pengutronix.de Link: https://lkml.kernel.org/r/20180319105202.9794-1-u.kleine-koenig@pengutronix.de
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r--kernel/irq/manage.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index d2b3c59f1200..b0aa23b2398e 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1523,9 +1523,9 @@ EXPORT_SYMBOL_GPL(setup_irq);
1523 * Internal function to unregister an irqaction - used to free 1523 * Internal function to unregister an irqaction - used to free
1524 * regular and special interrupts that are part of the architecture. 1524 * regular and special interrupts that are part of the architecture.
1525 */ 1525 */
1526static struct irqaction *__free_irq(unsigned int irq, void *dev_id) 1526static struct irqaction *__free_irq(struct irq_desc *desc, void *dev_id)
1527{ 1527{
1528 struct irq_desc *desc = irq_to_desc(irq); 1528 unsigned irq = desc->irq_data.irq;
1529 struct irqaction *action, **action_ptr; 1529 struct irqaction *action, **action_ptr;
1530 unsigned long flags; 1530 unsigned long flags;
1531 1531
@@ -1655,7 +1655,7 @@ void remove_irq(unsigned int irq, struct irqaction *act)
1655 struct irq_desc *desc = irq_to_desc(irq); 1655 struct irq_desc *desc = irq_to_desc(irq);
1656 1656
1657 if (desc && !WARN_ON(irq_settings_is_per_cpu_devid(desc))) 1657 if (desc && !WARN_ON(irq_settings_is_per_cpu_devid(desc)))
1658 __free_irq(irq, act->dev_id); 1658 __free_irq(desc, act->dev_id);
1659} 1659}
1660EXPORT_SYMBOL_GPL(remove_irq); 1660EXPORT_SYMBOL_GPL(remove_irq);
1661 1661
@@ -1689,7 +1689,7 @@ const void *free_irq(unsigned int irq, void *dev_id)
1689 desc->affinity_notify = NULL; 1689 desc->affinity_notify = NULL;
1690#endif 1690#endif
1691 1691
1692 action = __free_irq(irq, dev_id); 1692 action = __free_irq(desc, dev_id);
1693 1693
1694 if (!action) 1694 if (!action)
1695 return NULL; 1695 return NULL;