diff options
author | Bob Moore <robert.moore@intel.com> | 2012-06-29 06:04:17 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-07-14 19:17:29 +0400 |
commit | 5816b3430c4b5f31d9c35af1da7be721c9518137 (patch) | |
tree | 6d5877c622f05f65cab4040771a6654a5fbf47b3 /drivers/acpi/acpica/evgpeutil.c | |
parent | e40d5940396aa4002feeab8323224b5c7f84246c (diff) | |
download | linux-5816b3430c4b5f31d9c35af1da7be721c9518137.tar.xz |
ACPICA: Add support for implicit notify on multiple devices
Adds basic support to allow multiple devices to be implicitly
notified.
This change is partially derived from original commit 981858b("ACPI /
ACPICA: Implicit notify for multiple devices") by Rafael.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jung-uk Kim <jkim@freebsd.org>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/evgpeutil.c')
-rw-r--r-- | drivers/acpi/acpica/evgpeutil.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/evgpeutil.c b/drivers/acpi/acpica/evgpeutil.c index 3c43796b8361..0c33c62bd9eb 100644 --- a/drivers/acpi/acpica/evgpeutil.c +++ b/drivers/acpi/acpica/evgpeutil.c @@ -347,6 +347,8 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, void *context) { struct acpi_gpe_event_info *gpe_event_info; + struct acpi_gpe_notify_info *notify; + struct acpi_gpe_notify_info *next; u32 i; u32 j; @@ -365,10 +367,28 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_HANDLER) { + + /* Delete an installed handler block */ + ACPI_FREE(gpe_event_info->dispatch.handler); gpe_event_info->dispatch.handler = NULL; gpe_event_info->flags &= ~ACPI_GPE_DISPATCH_MASK; + } else if ((gpe_event_info-> + flags & ACPI_GPE_DISPATCH_MASK) == + ACPI_GPE_DISPATCH_NOTIFY) { + + /* Delete the implicit notification device list */ + + notify = gpe_event_info->dispatch.notify_list; + while (notify) { + next = notify->next; + ACPI_FREE(notify); + notify = next; + } + gpe_event_info->dispatch.notify_list = NULL; + gpe_event_info->flags &= + ~ACPI_GPE_DISPATCH_MASK; } } } |