diff options
Diffstat (limited to 'drivers/acpi/events/evgpe.c')
-rw-r--r-- | drivers/acpi/events/evgpe.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c index 5354be44f876..c5e53aae86f7 100644 --- a/drivers/acpi/events/evgpe.c +++ b/drivers/acpi/events/evgpe.c | |||
@@ -256,7 +256,7 @@ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
256 | return_ACPI_STATUS(status); | 256 | return_ACPI_STATUS(status); |
257 | } | 257 | } |
258 | 258 | ||
259 | /* Mark wake-disabled or HW disable, or both */ | 259 | /* Clear the appropriate enabled flags for this GPE */ |
260 | 260 | ||
261 | switch (gpe_event_info->flags & ACPI_GPE_TYPE_MASK) { | 261 | switch (gpe_event_info->flags & ACPI_GPE_TYPE_MASK) { |
262 | case ACPI_GPE_TYPE_WAKE: | 262 | case ACPI_GPE_TYPE_WAKE: |
@@ -273,13 +273,23 @@ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
273 | /* Disable the requested runtime GPE */ | 273 | /* Disable the requested runtime GPE */ |
274 | 274 | ||
275 | ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED); | 275 | ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED); |
276 | 276 | break; | |
277 | /* fallthrough */ | ||
278 | 277 | ||
279 | default: | 278 | default: |
280 | acpi_hw_write_gpe_enable_reg(gpe_event_info); | 279 | break; |
281 | } | 280 | } |
282 | 281 | ||
282 | /* | ||
283 | * Even if we don't know the GPE type, make sure that we always | ||
284 | * disable it. low_disable_gpe will just clear the enable bit for this | ||
285 | * GPE and write it. It will not write out the current GPE enable mask, | ||
286 | * since this may inadvertently enable GPEs too early, if a rogue GPE has | ||
287 | * come in during ACPICA initialization - possibly as a result of AML or | ||
288 | * other code that has enabled the GPE. | ||
289 | */ | ||
290 | status = acpi_hw_low_disable_gpe(gpe_event_info); | ||
291 | return_ACPI_STATUS(status); | ||
292 | |||
283 | return_ACPI_STATUS(AE_OK); | 293 | return_ACPI_STATUS(AE_OK); |
284 | } | 294 | } |
285 | 295 | ||
@@ -305,7 +315,7 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device, | |||
305 | { | 315 | { |
306 | union acpi_operand_object *obj_desc; | 316 | union acpi_operand_object *obj_desc; |
307 | struct acpi_gpe_block_info *gpe_block; | 317 | struct acpi_gpe_block_info *gpe_block; |
308 | acpi_native_uint i; | 318 | u32 i; |
309 | 319 | ||
310 | ACPI_FUNCTION_ENTRY(); | 320 | ACPI_FUNCTION_ENTRY(); |
311 | 321 | ||
@@ -379,8 +389,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) | |||
379 | u32 status_reg; | 389 | u32 status_reg; |
380 | u32 enable_reg; | 390 | u32 enable_reg; |
381 | acpi_cpu_flags flags; | 391 | acpi_cpu_flags flags; |
382 | acpi_native_uint i; | 392 | u32 i; |
383 | acpi_native_uint j; | 393 | u32 j; |
384 | 394 | ||
385 | ACPI_FUNCTION_NAME(ev_gpe_detect); | 395 | ACPI_FUNCTION_NAME(ev_gpe_detect); |
386 | 396 | ||
@@ -462,13 +472,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) | |||
462 | */ | 472 | */ |
463 | int_status |= | 473 | int_status |= |
464 | acpi_ev_gpe_dispatch(&gpe_block-> | 474 | acpi_ev_gpe_dispatch(&gpe_block-> |
465 | event_info[(i * | 475 | event_info[((acpi_size) i * ACPI_GPE_REGISTER_WIDTH) + j], j + gpe_register_info->base_gpe_number); |
466 | ACPI_GPE_REGISTER_WIDTH) | ||
467 | + | ||
468 | j], | ||
469 | (u32) j + | ||
470 | gpe_register_info-> | ||
471 | base_gpe_number); | ||
472 | } | 476 | } |
473 | } | 477 | } |
474 | } | 478 | } |
@@ -555,10 +559,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) | |||
555 | */ | 559 | */ |
556 | info->prefix_node = | 560 | info->prefix_node = |
557 | local_gpe_event_info.dispatch.method_node; | 561 | local_gpe_event_info.dispatch.method_node; |
558 | info->parameters = | ||
559 | ACPI_CAST_PTR(union acpi_operand_object *, | ||
560 | gpe_event_info); | ||
561 | info->parameter_type = ACPI_PARAM_GPE; | ||
562 | info->flags = ACPI_IGNORE_RETURN_VALUE; | 562 | info->flags = ACPI_IGNORE_RETURN_VALUE; |
563 | 563 | ||
564 | status = acpi_ns_evaluate(info); | 564 | status = acpi_ns_evaluate(info); |