diff options
| -rw-r--r-- | drivers/acpi/acpica/evgpe.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c index 837de669743a..78c55508aff5 100644 --- a/drivers/acpi/acpica/evgpe.c +++ b/drivers/acpi/acpica/evgpe.c | |||
| @@ -117,19 +117,14 @@ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
| 117 | if (ACPI_FAILURE(status)) | 117 | if (ACPI_FAILURE(status)) |
| 118 | return_ACPI_STATUS(status); | 118 | return_ACPI_STATUS(status); |
| 119 | 119 | ||
| 120 | /* Mark wake-enabled or HW enable, or both */ | 120 | /* Clear the GPE (of stale events), then enable it */ |
| 121 | 121 | status = acpi_hw_clear_gpe(gpe_event_info); | |
| 122 | if (gpe_event_info->runtime_count) { | 122 | if (ACPI_FAILURE(status)) |
| 123 | /* Clear the GPE (of stale events), then enable it */ | 123 | return_ACPI_STATUS(status); |
| 124 | status = acpi_hw_clear_gpe(gpe_event_info); | ||
| 125 | if (ACPI_FAILURE(status)) | ||
| 126 | return_ACPI_STATUS(status); | ||
| 127 | |||
| 128 | /* Enable the requested runtime GPE */ | ||
| 129 | status = acpi_hw_write_gpe_enable_reg(gpe_event_info); | ||
| 130 | } | ||
| 131 | 124 | ||
| 132 | return_ACPI_STATUS(AE_OK); | 125 | /* Enable the requested GPE */ |
| 126 | status = acpi_hw_write_gpe_enable_reg(gpe_event_info); | ||
| 127 | return_ACPI_STATUS(status); | ||
| 133 | } | 128 | } |
| 134 | 129 | ||
| 135 | /******************************************************************************* | 130 | /******************************************************************************* |
