diff options
Diffstat (limited to 'drivers/acpi/acpica/evxface.c')
-rw-r--r-- | drivers/acpi/acpica/evxface.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c index 76cfe71c6b28..db820600b503 100644 --- a/drivers/acpi/acpica/evxface.c +++ b/drivers/acpi/acpica/evxface.c | |||
@@ -249,6 +249,7 @@ acpi_remove_notify_handler(acpi_handle device, | |||
249 | (handler_type > ACPI_MAX_NOTIFY_HANDLER_TYPE)) { | 249 | (handler_type > ACPI_MAX_NOTIFY_HANDLER_TYPE)) { |
250 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 250 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
251 | } | 251 | } |
252 | |||
252 | /* Make sure all deferred notify tasks are completed */ | 253 | /* Make sure all deferred notify tasks are completed */ |
253 | 254 | ||
254 | acpi_os_wait_events_complete(); | 255 | acpi_os_wait_events_complete(); |
@@ -622,12 +623,12 @@ acpi_install_gpe_handler(acpi_handle gpe_device, | |||
622 | goto free_and_exit; | 623 | goto free_and_exit; |
623 | } | 624 | } |
624 | 625 | ||
625 | |||
626 | handler->address = address; | 626 | handler->address = address; |
627 | handler->context = context; | 627 | handler->context = context; |
628 | handler->method_node = gpe_event_info->dispatch.method_node; | 628 | handler->method_node = gpe_event_info->dispatch.method_node; |
629 | handler->original_flags = gpe_event_info->flags & | 629 | handler->original_flags = (u8)(gpe_event_info->flags & |
630 | (ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); | 630 | (ACPI_GPE_XRUPT_TYPE_MASK | |
631 | ACPI_GPE_DISPATCH_MASK)); | ||
631 | 632 | ||
632 | /* | 633 | /* |
633 | * If the GPE is associated with a method, it may have been enabled | 634 | * If the GPE is associated with a method, it may have been enabled |
@@ -746,10 +747,10 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, | |||
746 | * enabled, it should be enabled at this point to restore the | 747 | * enabled, it should be enabled at this point to restore the |
747 | * post-initialization configuration. | 748 | * post-initialization configuration. |
748 | */ | 749 | */ |
749 | 750 | if ((handler->original_flags & ACPI_GPE_DISPATCH_METHOD) && | |
750 | if ((handler->original_flags & ACPI_GPE_DISPATCH_METHOD) | 751 | handler->originally_enabled) { |
751 | && handler->originally_enabled) | ||
752 | (void)acpi_ev_add_gpe_reference(gpe_event_info); | 752 | (void)acpi_ev_add_gpe_reference(gpe_event_info); |
753 | } | ||
753 | 754 | ||
754 | /* Now we can free the handler object */ | 755 | /* Now we can free the handler object */ |
755 | 756 | ||