summaryrefslogtreecommitdiff
path: root/drivers/spmi/spmi-pmic-arb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spmi/spmi-pmic-arb.c')
-rw-r--r--drivers/spmi/spmi-pmic-arb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index 928759242e42..bc7dc1d6e4b2 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -745,10 +745,15 @@ static void qpnpint_irq_domain_map(struct spmi_pmic_arb *pmic_arb,
irq_hw_number_t hwirq, unsigned int type)
{
irq_flow_handler_t handler;
+ unsigned int old_virq;
dev_dbg(&pmic_arb->spmic->dev, "virq = %u, hwirq = %lu, type = %u\n",
virq, hwirq, type);
+ old_virq = irq_find_mapping(domain, hwirq);
+ if (old_virq)
+ irq_domain_disassociate(domain, old_virq);
+
if (type & IRQ_TYPE_EDGE_BOTH)
handler = handle_edge_irq;
else