diff options
Diffstat (limited to 'drivers/acpi/acpica/evxfevnt.c')
-rw-r--r-- | drivers/acpi/acpica/evxfevnt.c | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/drivers/acpi/acpica/evxfevnt.c b/drivers/acpi/acpica/evxfevnt.c index 467fde961aef..b094cc0183d7 100644 --- a/drivers/acpi/acpica/evxfevnt.c +++ b/drivers/acpi/acpica/evxfevnt.c | |||
@@ -210,44 +210,6 @@ ACPI_EXPORT_SYMBOL(acpi_enable_event) | |||
210 | 210 | ||
211 | /******************************************************************************* | 211 | /******************************************************************************* |
212 | * | 212 | * |
213 | * FUNCTION: acpi_clear_and_enable_gpe | ||
214 | * | ||
215 | * PARAMETERS: gpe_event_info - GPE to enable | ||
216 | * | ||
217 | * RETURN: Status | ||
218 | * | ||
219 | * DESCRIPTION: Clear the given GPE from stale events and enable it. | ||
220 | * | ||
221 | ******************************************************************************/ | ||
222 | static acpi_status | ||
223 | acpi_clear_and_enable_gpe(struct acpi_gpe_event_info *gpe_event_info) | ||
224 | { | ||
225 | acpi_status status; | ||
226 | |||
227 | /* | ||
228 | * We will only allow a GPE to be enabled if it has either an | ||
229 | * associated method (_Lxx/_Exx) or a handler. Otherwise, the | ||
230 | * GPE will be immediately disabled by acpi_ev_gpe_dispatch the | ||
231 | * first time it fires. | ||
232 | */ | ||
233 | if (!(gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK)) { | ||
234 | return_ACPI_STATUS(AE_NO_HANDLER); | ||
235 | } | ||
236 | |||
237 | /* Clear the GPE (of stale events) */ | ||
238 | status = acpi_hw_clear_gpe(gpe_event_info); | ||
239 | if (ACPI_FAILURE(status)) { | ||
240 | return_ACPI_STATUS(status); | ||
241 | } | ||
242 | |||
243 | /* Enable the requested GPE */ | ||
244 | status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_ENABLE); | ||
245 | |||
246 | return_ACPI_STATUS(status); | ||
247 | } | ||
248 | |||
249 | /******************************************************************************* | ||
250 | * | ||
251 | * FUNCTION: acpi_set_gpe | 213 | * FUNCTION: acpi_set_gpe |
252 | * | 214 | * |
253 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 | 215 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 |
@@ -287,7 +249,7 @@ acpi_status acpi_set_gpe(acpi_handle gpe_device, u32 gpe_number, u8 action) | |||
287 | 249 | ||
288 | switch (action) { | 250 | switch (action) { |
289 | case ACPI_GPE_ENABLE: | 251 | case ACPI_GPE_ENABLE: |
290 | status = acpi_clear_and_enable_gpe(gpe_event_info); | 252 | status = acpi_ev_enable_gpe(gpe_event_info); |
291 | break; | 253 | break; |
292 | 254 | ||
293 | case ACPI_GPE_DISABLE: | 255 | case ACPI_GPE_DISABLE: |
@@ -414,7 +376,7 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number) | |||
414 | if (gpe_event_info->runtime_count == 1) { | 376 | if (gpe_event_info->runtime_count == 1) { |
415 | status = acpi_ev_update_gpe_enable_mask(gpe_event_info); | 377 | status = acpi_ev_update_gpe_enable_mask(gpe_event_info); |
416 | if (ACPI_SUCCESS(status)) { | 378 | if (ACPI_SUCCESS(status)) { |
417 | status = acpi_clear_and_enable_gpe(gpe_event_info); | 379 | status = acpi_ev_enable_gpe(gpe_event_info); |
418 | } | 380 | } |
419 | if (ACPI_FAILURE(status)) { | 381 | if (ACPI_FAILURE(status)) { |
420 | gpe_event_info->runtime_count--; | 382 | gpe_event_info->runtime_count--; |