[PATCH] intel_pmic_gpio: modify EOI handling following change of kernel irq subsystem
authorFeng Tang <feng.tang@intel.com>
Fri, 31 Dec 2010 01:48:20 +0000 (09:48 +0800)
committerMatthew Garrett <mjg@redhat.com>
Fri, 7 Jan 2011 22:26:57 +0000 (17:26 -0500)
Latest kernel has many changes in IRQ subsystem and its interfaces, like adding
"irq_eoi" for struct irq_chip, this patch will make it support both the new
and old interface.

Cc: Alek Du <alek.du@intel.com>
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/intel_pmic_gpio.c

index e61db9dfebefd2382c65cbbecf8bdb57d3e63f28..930e62762365ab262155baf814ad6f74fa261733 100644 (file)
@@ -244,7 +244,11 @@ static void pmic_irq_handler(unsigned irq, struct irq_desc *desc)
                        generic_handle_irq(pg->irq_base + gpio);
                }
        }
-       desc->chip->eoi(irq);
+
+       if (desc->chip->irq_eoi)
+               desc->chip->irq_eoi(irq_get_irq_data(irq));
+       else
+               dev_warn(pg->chip.dev, "missing EOI handler for irq %d\n", irq);
 }
 
 static int __devinit platform_pmic_gpio_probe(struct platform_device *pdev)