diff options
| -rw-r--r-- | drivers/acpi/acpica/evgpe.c | 5 | ||||
| -rw-r--r-- | drivers/acpi/acpica/hwgpe.c | 11 | ||||
| -rw-r--r-- | include/acpi/actypes.h | 4 |
3 files changed, 7 insertions, 13 deletions
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c index 5ed064e8673c..ccf793247447 100644 --- a/drivers/acpi/acpica/evgpe.c +++ b/drivers/acpi/acpica/evgpe.c | |||
| @@ -92,6 +92,7 @@ acpi_ev_update_gpe_enable_mask(struct acpi_gpe_event_info *gpe_event_info) | |||
| 92 | ACPI_SET_BIT(gpe_register_info->enable_for_run, | 92 | ACPI_SET_BIT(gpe_register_info->enable_for_run, |
| 93 | (u8)register_bit); | 93 | (u8)register_bit); |
| 94 | } | 94 | } |
| 95 | gpe_register_info->enable_mask = gpe_register_info->enable_for_run; | ||
| 95 | 96 | ||
| 96 | return_ACPI_STATUS(AE_OK); | 97 | return_ACPI_STATUS(AE_OK); |
| 97 | } | 98 | } |
| @@ -123,7 +124,7 @@ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
| 123 | 124 | ||
| 124 | /* Enable the requested GPE */ | 125 | /* Enable the requested GPE */ |
| 125 | 126 | ||
| 126 | status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_ENABLE_SAVE); | 127 | status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_ENABLE); |
| 127 | return_ACPI_STATUS(status); | 128 | return_ACPI_STATUS(status); |
| 128 | } | 129 | } |
| 129 | 130 | ||
| @@ -202,7 +203,7 @@ acpi_ev_remove_gpe_reference(struct acpi_gpe_event_info *gpe_event_info) | |||
| 202 | if (ACPI_SUCCESS(status)) { | 203 | if (ACPI_SUCCESS(status)) { |
| 203 | status = | 204 | status = |
| 204 | acpi_hw_low_set_gpe(gpe_event_info, | 205 | acpi_hw_low_set_gpe(gpe_event_info, |
| 205 | ACPI_GPE_DISABLE_SAVE); | 206 | ACPI_GPE_DISABLE); |
| 206 | } | 207 | } |
| 207 | 208 | ||
| 208 | if (ACPI_FAILURE(status)) { | 209 | if (ACPI_FAILURE(status)) { |
diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c index d7be3cbff151..73cfa5947ff3 100644 --- a/drivers/acpi/acpica/hwgpe.c +++ b/drivers/acpi/acpica/hwgpe.c | |||
| @@ -89,6 +89,8 @@ u32 acpi_hw_get_gpe_register_bit(struct acpi_gpe_event_info *gpe_event_info) | |||
| 89 | * RETURN: Status | 89 | * RETURN: Status |
| 90 | * | 90 | * |
| 91 | * DESCRIPTION: Enable or disable a single GPE in the parent enable register. | 91 | * DESCRIPTION: Enable or disable a single GPE in the parent enable register. |
| 92 | * The enable_mask field of the involved GPE register must be | ||
| 93 | * updated by the caller if necessary. | ||
| 92 | * | 94 | * |
| 93 | ******************************************************************************/ | 95 | ******************************************************************************/ |
| 94 | 96 | ||
| @@ -119,7 +121,7 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action) | |||
| 119 | /* Set or clear just the bit that corresponds to this GPE */ | 121 | /* Set or clear just the bit that corresponds to this GPE */ |
| 120 | 122 | ||
| 121 | register_bit = acpi_hw_get_gpe_register_bit(gpe_event_info); | 123 | register_bit = acpi_hw_get_gpe_register_bit(gpe_event_info); |
| 122 | switch (action & ~ACPI_GPE_SAVE_MASK) { | 124 | switch (action) { |
| 123 | case ACPI_GPE_CONDITIONAL_ENABLE: | 125 | case ACPI_GPE_CONDITIONAL_ENABLE: |
| 124 | 126 | ||
| 125 | /* Only enable if the corresponding enable_mask bit is set */ | 127 | /* Only enable if the corresponding enable_mask bit is set */ |
| @@ -149,9 +151,6 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action) | |||
| 149 | /* Write the updated enable mask */ | 151 | /* Write the updated enable mask */ |
| 150 | 152 | ||
| 151 | status = acpi_hw_write(enable_mask, &gpe_register_info->enable_address); | 153 | status = acpi_hw_write(enable_mask, &gpe_register_info->enable_address); |
| 152 | if (ACPI_SUCCESS(status) && (action & ACPI_GPE_SAVE_MASK)) { | ||
| 153 | gpe_register_info->enable_mask = (u8)enable_mask; | ||
| 154 | } | ||
| 155 | return (status); | 154 | return (status); |
| 156 | } | 155 | } |
| 157 | 156 | ||
| @@ -297,10 +296,8 @@ acpi_hw_gpe_enable_write(u8 enable_mask, | |||
| 297 | { | 296 | { |
| 298 | acpi_status status; | 297 | acpi_status status; |
| 299 | 298 | ||
| 299 | gpe_register_info->enable_mask = enable_mask; | ||
| 300 | status = acpi_hw_write(enable_mask, &gpe_register_info->enable_address); | 300 | status = acpi_hw_write(enable_mask, &gpe_register_info->enable_address); |
| 301 | if (ACPI_SUCCESS(status)) { | ||
| 302 | gpe_register_info->enable_mask = enable_mask; | ||
| 303 | } | ||
| 304 | return (status); | 301 | return (status); |
| 305 | } | 302 | } |
| 306 | 303 | ||
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index ace520f3780e..f5ca0e989bba 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
| @@ -759,10 +759,6 @@ typedef u32 acpi_event_status; | |||
| 759 | #define ACPI_GPE_ENABLE 0 | 759 | #define ACPI_GPE_ENABLE 0 |
| 760 | #define ACPI_GPE_DISABLE 1 | 760 | #define ACPI_GPE_DISABLE 1 |
| 761 | #define ACPI_GPE_CONDITIONAL_ENABLE 2 | 761 | #define ACPI_GPE_CONDITIONAL_ENABLE 2 |
| 762 | #define ACPI_GPE_SAVE_MASK 4 | ||
| 763 | |||
| 764 | #define ACPI_GPE_ENABLE_SAVE (ACPI_GPE_ENABLE | ACPI_GPE_SAVE_MASK) | ||
| 765 | #define ACPI_GPE_DISABLE_SAVE (ACPI_GPE_DISABLE | ACPI_GPE_SAVE_MASK) | ||
| 766 | 762 | ||
| 767 | /* | 763 | /* |
| 768 | * GPE info flags - Per GPE | 764 | * GPE info flags - Per GPE |
