|
@@ -443,6 +443,8 @@ void gpiochip_set_chained_irqchip(struct gpio_chip *gpiochip,
|
|
*/
|
|
*/
|
|
irq_set_handler_data(parent_irq, gpiochip);
|
|
irq_set_handler_data(parent_irq, gpiochip);
|
|
irq_set_chained_handler(parent_irq, parent_handler);
|
|
irq_set_chained_handler(parent_irq, parent_handler);
|
|
|
|
+
|
|
|
|
+ gpiochip->irq_parent = parent_irq;
|
|
}
|
|
}
|
|
|
|
|
|
/* Set the parent IRQ for all affected IRQs */
|
|
/* Set the parent IRQ for all affected IRQs */
|
|
@@ -551,6 +553,11 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip)
|
|
|
|
|
|
acpi_gpiochip_free_interrupts(gpiochip);
|
|
acpi_gpiochip_free_interrupts(gpiochip);
|
|
|
|
|
|
|
|
+ if (gpiochip->irq_parent) {
|
|
|
|
+ irq_set_chained_handler(gpiochip->irq_parent, NULL);
|
|
|
|
+ irq_set_handler_data(gpiochip->irq_parent, NULL);
|
|
|
|
+ }
|
|
|
|
+
|
|
/* Remove all IRQ mappings and delete the domain */
|
|
/* Remove all IRQ mappings and delete the domain */
|
|
if (gpiochip->irqdomain) {
|
|
if (gpiochip->irqdomain) {
|
|
for (offset = 0; offset < gpiochip->ngpio; offset++)
|
|
for (offset = 0; offset < gpiochip->ngpio; offset++)
|