aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/irqchip/irq-pruss-intc.c')
-rw-r--r--drivers/irqchip/irq-pruss-intc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-intc.c
index 022b4cfa811a..c02e5e9600c9 100644
--- a/drivers/irqchip/irq-pruss-intc.c
+++ b/drivers/irqchip/irq-pruss-intc.c
@@ -577,6 +577,11 @@ static int pruss_intc_probe(struct platform_device *pdev)
577 return 0; 577 return 0;
578 578
579fail_irq: 579fail_irq:
580 while (--i >= 0) {
581 if (intc->irqs[i])
582 irq_set_chained_handler_and_data(intc->irqs[i], NULL,
583 NULL);
584 }
580 irq_domain_remove(intc->domain); 585 irq_domain_remove(intc->domain);
581 return irq; 586 return irq;
582} 587}
@@ -585,6 +590,13 @@ static int pruss_intc_remove(struct platform_device *pdev)
585{ 590{
586 struct pruss_intc *intc = platform_get_drvdata(pdev); 591 struct pruss_intc *intc = platform_get_drvdata(pdev);
587 unsigned int hwirq; 592 unsigned int hwirq;
593 int i;
594
595 for (i = 0; i < MAX_HOST_NUM_IRQS; i++) {
596 if (intc->irqs[i])
597 irq_set_chained_handler_and_data(intc->irqs[i], NULL,
598 NULL);
599 }
588 600
589 if (intc->domain) { 601 if (intc->domain) {
590 for (hwirq = 0; hwirq < MAX_PRU_SYS_EVENTS; hwirq++) 602 for (hwirq = 0; hwirq < MAX_PRU_SYS_EVENTS; hwirq++)