mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
PCI/MSI: pci-xgene-msi: Consolidate chained IRQ handler install/remove
Chained irq handlers usually set up handler data as well. We now have a function to set both under irq_desc->lock. Replace the two calls with one. Search and conversion was done with coccinelle. Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Cc: Duc Dang <dhdang@apm.com>
This commit is contained in:
parent
f70229e2a3
commit
36f024ed8f
1 changed files with 6 additions and 8 deletions
|
@ -368,10 +368,8 @@ static int xgene_msi_remove(struct platform_device *pdev)
|
||||||
|
|
||||||
for (i = 0; i < NR_HW_IRQS; i++) {
|
for (i = 0; i < NR_HW_IRQS; i++) {
|
||||||
virq = msi->msi_groups[i].gic_irq;
|
virq = msi->msi_groups[i].gic_irq;
|
||||||
if (virq != 0) {
|
if (virq != 0)
|
||||||
irq_set_chained_handler(virq, NULL);
|
irq_set_chained_handler_and_data(virq, NULL, NULL);
|
||||||
irq_set_handler_data(virq, NULL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
kfree(msi->msi_groups);
|
kfree(msi->msi_groups);
|
||||||
|
|
||||||
|
@ -421,8 +419,8 @@ static int xgene_msi_hwirq_alloc(unsigned int cpu)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
irq_set_chained_handler(msi_group->gic_irq, NULL);
|
irq_set_chained_handler_and_data(msi_group->gic_irq,
|
||||||
irq_set_handler_data(msi_group->gic_irq, NULL);
|
NULL, NULL);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -441,8 +439,8 @@ static void xgene_msi_hwirq_free(unsigned int cpu)
|
||||||
if (!msi_group->gic_irq)
|
if (!msi_group->gic_irq)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
irq_set_chained_handler(msi_group->gic_irq, NULL);
|
irq_set_chained_handler_and_data(msi_group->gic_irq, NULL,
|
||||||
irq_set_handler_data(msi_group->gic_irq, NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue