diff options
-rw-r--r-- | drivers/acpi/acpica/evevent.c | 12 | ||||
-rw-r--r-- | drivers/acpi/acpica/evxface.c | 21 |
2 files changed, 19 insertions, 14 deletions
diff --git a/drivers/acpi/acpica/evevent.c b/drivers/acpi/acpica/evevent.c index b8ea0b26cde3..02219ffba8b6 100644 --- a/drivers/acpi/acpica/evevent.c +++ b/drivers/acpi/acpica/evevent.c | |||
@@ -257,6 +257,8 @@ u32 acpi_ev_fixed_event_detect(void) | |||
257 | * | 257 | * |
258 | * DESCRIPTION: Clears the status bit for the requested event, calls the | 258 | * DESCRIPTION: Clears the status bit for the requested event, calls the |
259 | * handler that previously registered for the event. | 259 | * handler that previously registered for the event. |
260 | * NOTE: If there is no handler for the event, the event is | ||
261 | * disabled to prevent futher interrupts. | ||
260 | * | 262 | * |
261 | ******************************************************************************/ | 263 | ******************************************************************************/ |
262 | 264 | ||
@@ -271,17 +273,17 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event) | |||
271 | status_register_id, ACPI_CLEAR_STATUS); | 273 | status_register_id, ACPI_CLEAR_STATUS); |
272 | 274 | ||
273 | /* | 275 | /* |
274 | * Make sure we've got a handler. If not, report an error. The event is | 276 | * Make sure that a handler exists. If not, report an error |
275 | * disabled to prevent further interrupts. | 277 | * and disable the event to prevent further interrupts. |
276 | */ | 278 | */ |
277 | if (NULL == acpi_gbl_fixed_event_handlers[event].handler) { | 279 | if (!acpi_gbl_fixed_event_handlers[event].handler) { |
278 | (void)acpi_write_bit_register(acpi_gbl_fixed_event_info[event]. | 280 | (void)acpi_write_bit_register(acpi_gbl_fixed_event_info[event]. |
279 | enable_register_id, | 281 | enable_register_id, |
280 | ACPI_DISABLE_EVENT); | 282 | ACPI_DISABLE_EVENT); |
281 | 283 | ||
282 | ACPI_ERROR((AE_INFO, | 284 | ACPI_ERROR((AE_INFO, |
283 | "No installed handler for fixed event [0x%08X]", | 285 | "No installed handler for fixed event - %s (%u), disabling", |
284 | event)); | 286 | acpi_ut_get_event_name(event), event)); |
285 | 287 | ||
286 | return (ACPI_INTERRUPT_NOT_HANDLED); | 288 | return (ACPI_INTERRUPT_NOT_HANDLED); |
287 | } | 289 | } |
diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c index ddffd6847914..ca5fba99c33b 100644 --- a/drivers/acpi/acpica/evxface.c +++ b/drivers/acpi/acpica/evxface.c | |||
@@ -467,9 +467,9 @@ acpi_install_fixed_event_handler(u32 event, | |||
467 | return_ACPI_STATUS(status); | 467 | return_ACPI_STATUS(status); |
468 | } | 468 | } |
469 | 469 | ||
470 | /* Don't allow two handlers. */ | 470 | /* Do not allow multiple handlers */ |
471 | 471 | ||
472 | if (NULL != acpi_gbl_fixed_event_handlers[event].handler) { | 472 | if (acpi_gbl_fixed_event_handlers[event].handler) { |
473 | status = AE_ALREADY_EXISTS; | 473 | status = AE_ALREADY_EXISTS; |
474 | goto cleanup; | 474 | goto cleanup; |
475 | } | 475 | } |
@@ -483,8 +483,9 @@ acpi_install_fixed_event_handler(u32 event, | |||
483 | if (ACPI_SUCCESS(status)) | 483 | if (ACPI_SUCCESS(status)) |
484 | status = acpi_enable_event(event, 0); | 484 | status = acpi_enable_event(event, 0); |
485 | if (ACPI_FAILURE(status)) { | 485 | if (ACPI_FAILURE(status)) { |
486 | ACPI_WARNING((AE_INFO, "Could not enable fixed event 0x%X", | 486 | ACPI_WARNING((AE_INFO, |
487 | event)); | 487 | "Could not enable fixed event - %s (%u)", |
488 | acpi_ut_get_event_name(event), event)); | ||
488 | 489 | ||
489 | /* Remove the handler */ | 490 | /* Remove the handler */ |
490 | 491 | ||
@@ -492,7 +493,8 @@ acpi_install_fixed_event_handler(u32 event, | |||
492 | acpi_gbl_fixed_event_handlers[event].context = NULL; | 493 | acpi_gbl_fixed_event_handlers[event].context = NULL; |
493 | } else { | 494 | } else { |
494 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 495 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
495 | "Enabled fixed event %X, Handler=%p\n", event, | 496 | "Enabled fixed event %s (%X), Handler=%p\n", |
497 | acpi_ut_get_event_name(event), event, | ||
496 | handler)); | 498 | handler)); |
497 | } | 499 | } |
498 | 500 | ||
@@ -544,11 +546,12 @@ acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) | |||
544 | 546 | ||
545 | if (ACPI_FAILURE(status)) { | 547 | if (ACPI_FAILURE(status)) { |
546 | ACPI_WARNING((AE_INFO, | 548 | ACPI_WARNING((AE_INFO, |
547 | "Could not write to fixed event enable register 0x%X", | 549 | "Could not disable fixed event - %s (%u)", |
548 | event)); | 550 | acpi_ut_get_event_name(event), event)); |
549 | } else { | 551 | } else { |
550 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Disabled fixed event %X\n", | 552 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
551 | event)); | 553 | "Disabled fixed event - %s (%X)\n", |
554 | acpi_ut_get_event_name(event), event)); | ||
552 | } | 555 | } |
553 | 556 | ||
554 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | 557 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); |