Merge branches 'pm-cpufreq', 'pm-cpuidle', 'pm-devfreq', 'pm-opp' and 'pm-tools'
[linux-drm-fsl-dcu.git] / drivers / acpi / acpica / evgpeutil.c
index 17e4bbfdb096c2e9c522b2a387abfed80943d2aa..3a958f3612fe6860ff7082660cf89f30988fee85 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -106,53 +106,6 @@ unlock_and_exit:
        return_ACPI_STATUS(status);
 }
 
-/*******************************************************************************
- *
- * FUNCTION:    acpi_ev_valid_gpe_event
- *
- * PARAMETERS:  gpe_event_info              - Info for this GPE
- *
- * RETURN:      TRUE if the gpe_event is valid
- *
- * DESCRIPTION: Validate a GPE event. DO NOT CALL FROM INTERRUPT LEVEL.
- *              Should be called only when the GPE lists are semaphore locked
- *              and not subject to change.
- *
- ******************************************************************************/
-
-u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info)
-{
-       struct acpi_gpe_xrupt_info *gpe_xrupt_block;
-       struct acpi_gpe_block_info *gpe_block;
-
-       ACPI_FUNCTION_ENTRY();
-
-       /* No need for spin lock since we are not changing any list elements */
-
-       /* Walk the GPE interrupt levels */
-
-       gpe_xrupt_block = acpi_gbl_gpe_xrupt_list_head;
-       while (gpe_xrupt_block) {
-               gpe_block = gpe_xrupt_block->gpe_block_list_head;
-
-               /* Walk the GPE blocks on this interrupt level */
-
-               while (gpe_block) {
-                       if ((&gpe_block->event_info[0] <= gpe_event_info) &&
-                           (&gpe_block->event_info[gpe_block->gpe_count] >
-                            gpe_event_info)) {
-                               return (TRUE);
-                       }
-
-                       gpe_block = gpe_block->next;
-               }
-
-               gpe_xrupt_block = gpe_xrupt_block->next;
-       }
-
-       return (FALSE);
-}
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ev_get_gpe_device
@@ -371,8 +324,10 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
                                                                 ACPI_GPE_REGISTER_WIDTH)
                                                                + j];
 
-                       if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
-                           ACPI_GPE_DISPATCH_HANDLER) {
+                       if ((ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) ==
+                            ACPI_GPE_DISPATCH_HANDLER) ||
+                           (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) ==
+                            ACPI_GPE_DISPATCH_RAW_HANDLER)) {
 
                                /* Delete an installed handler block */
 
@@ -380,10 +335,8 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
                                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) {
+                       } else if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags)
+                                  == ACPI_GPE_DISPATCH_NOTIFY) {
 
                                /* Delete the implicit notification device list */