Commit 46189518 authored by Laxman Dewangan's avatar Laxman Dewangan Committed by Mark Brown
Browse files

regmap: irq: dispose all virtual irq before removing domain

It is require to dispose all virtual irq of hwirq on chip
created on given irq domain before removing this irq domain.
Hence dispose all mapped irqs before deleting the irq domains
in regmap_del_irq_chip();

Signed-off-by: default avatarLaxman Dewangan <>
Reviewed-by: default avatarJavier Martinez Canillas <>
Tested-by: default avatarJavier Martinez Canillas <>
Signed-off-by: Mark Brown's avatarMark Brown <>
parent 92e963f5
......@@ -655,13 +655,34 @@ EXPORT_SYMBOL_GPL(regmap_add_irq_chip);
* @irq: Primary IRQ for the device
* @d: regmap_irq_chip_data allocated by regmap_add_irq_chip()
* This function also dispose all mapped irq on chip.
void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
unsigned int virq;
int hwirq;
if (!d)
free_irq(irq, d);
/* Dispose all virtual irq from irq domain before removing it */
for (hwirq = 0; hwirq < d->chip->num_irqs; hwirq++) {
/* Ignore hwirq if holes in the IRQ list */
if (!d->chip->irqs[hwirq].mask)
* Find the virtual irq of hwirq on chip and if it is
* there then dispose it
virq = irq_find_mapping(d->domain, hwirq);
if (virq)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment