ACPI: GED: unregister interrupts during shutdown
authorSinan Kaya <okaya@codeaurora.org>
Wed, 13 Dec 2017 00:37:27 +0000 (19:37 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 16 Dec 2017 02:05:37 +0000 (03:05 +0100)
commit099caa9137624e69d936a62ce585d1adaec385ab
tree4875d09fcbe21718eb39b4c408b6b1bc02797ae3
parent50c4c4e268a2d7a3e58ebb698ac74da0de40ae36
ACPI: GED: unregister interrupts during shutdown

Some GED interrupts could be pending by the time we are doing a reboot.

Even though GED driver uses devm_request_irq() to register the interrupt
handler, the handler is not being freed on time during a shutdown since
the driver is missing a shutdown callback.

If the ACPI handler is no longer available, this causes an interrupt
storm and delays shutdown.

 1. Don't use devm family of functions for IRQ registration/free
 2. Keep track of the events since free_irq() requires the dev_id
    parameter passed into the request_irq() function.
 3. Call free_irq() on both remove and shutdown explicitly.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/evged.c