Merge tag 'nomadik-for-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[cascardo/linux.git] / drivers / acpi / acpica / hwgpe.c
index ea62d40..48ac7b7 100644 (file)
@@ -202,7 +202,7 @@ acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info)
 
 acpi_status
 acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info,
-                      acpi_event_status * event_status)
+                      acpi_event_status *event_status)
 {
        u32 in_byte;
        u32 register_bit;
@@ -216,6 +216,13 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info,
                return (AE_BAD_PARAMETER);
        }
 
+       /* GPE currently handled? */
+
+       if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) !=
+           ACPI_GPE_DISPATCH_NONE) {
+               local_event_status |= ACPI_EVENT_FLAG_HAS_HANDLER;
+       }
+
        /* Get the info block for the entire GPE register */
 
        gpe_register_info = gpe_event_info->register_info;