aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/acpica/evgpeblk.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c
index 85ded1f2540d..79048de0aded 100644
--- a/drivers/acpi/acpica/evgpeblk.c
+++ b/drivers/acpi/acpica/evgpeblk.c
@@ -1024,6 +1024,19 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
1024 1024
1025 gpe_index = (i * ACPI_GPE_REGISTER_WIDTH) + j; 1025 gpe_index = (i * ACPI_GPE_REGISTER_WIDTH) + j;
1026 gpe_event_info = &gpe_block->event_info[gpe_index]; 1026 gpe_event_info = &gpe_block->event_info[gpe_index];
1027 gpe_number = gpe_index + gpe_block->block_base_number;
1028
1029 /*
1030 * If the GPE has already been enabled for runtime
1031 * signaling, make sure it remains enabled, but do not
1032 * increment its reference counter.
1033 */
1034 if (gpe_event_info->runtime_count) {
1035 acpi_set_gpe(gpe_device, gpe_number,
1036 ACPI_GPE_ENABLE);
1037 gpe_enabled_count++;
1038 continue;
1039 }
1027 1040
1028 if (gpe_event_info->flags & ACPI_GPE_CAN_WAKE) { 1041 if (gpe_event_info->flags & ACPI_GPE_CAN_WAKE) {
1029 wake_gpe_count++; 1042 wake_gpe_count++;
@@ -1040,7 +1053,6 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
1040 1053
1041 /* Enable this GPE */ 1054 /* Enable this GPE */
1042 1055
1043 gpe_number = gpe_index + gpe_block->block_base_number;
1044 status = acpi_enable_gpe(gpe_device, gpe_number, 1056 status = acpi_enable_gpe(gpe_device, gpe_number,
1045 ACPI_GPE_TYPE_RUNTIME); 1057 ACPI_GPE_TYPE_RUNTIME);
1046 if (ACPI_FAILURE(status)) { 1058 if (ACPI_FAILURE(status)) {