ACPICA: Restructure includes into public/private
[safe/jmp/linux-2.6] / drivers / acpi / events / evevent.c
index a1f87b5..86bf083 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2007, R. Byron Moore
+ * Copyright (C) 2000 - 2008, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,6 +42,7 @@
  */
 
 #include <acpi/acpi.h>
+#include <acpi/accommon.h>
 #include <acpi/acevents.h>
 
 #define _COMPONENT          ACPI_EVENTS
@@ -72,8 +73,8 @@ acpi_status acpi_ev_initialize_events(void)
 
        /*
         * Initialize the Fixed and General Purpose Events. This is done prior to
-        * enabling SCIs to prevent interrupts from occurring before the handlers are
-        * installed.
+        * enabling SCIs to prevent interrupts from occurring before the handlers
+        * are installed.
         */
        status = acpi_ev_fixed_event_initialize();
        if (ACPI_FAILURE(status)) {
@@ -188,12 +189,12 @@ acpi_status acpi_ev_install_xrupt_handlers(void)
 
 static acpi_status acpi_ev_fixed_event_initialize(void)
 {
-       acpi_native_uint i;
+       u32 i;
        acpi_status status;
 
        /*
-        * Initialize the structure that keeps track of fixed event handlers
-        * and enable the fixed events.
+        * Initialize the structure that keeps track of fixed event handlers and
+        * enable the fixed events.
         */
        for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) {
                acpi_gbl_fixed_event_handlers[i].handler = NULL;
@@ -231,18 +232,16 @@ u32 acpi_ev_fixed_event_detect(void)
        u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
        u32 fixed_status;
        u32 fixed_enable;
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_NAME(ev_fixed_event_detect);
 
        /*
         * Read the fixed feature status and enable registers, as all the cases
-        * depend on their values.  Ignore errors here.
+        * depend on their values. Ignore errors here.
         */
-       (void)acpi_hw_register_read(ACPI_MTX_DO_NOT_LOCK,
-                                   ACPI_REGISTER_PM1_STATUS, &fixed_status);
-       (void)acpi_hw_register_read(ACPI_MTX_DO_NOT_LOCK,
-                                   ACPI_REGISTER_PM1_ENABLE, &fixed_enable);
+       (void)acpi_hw_register_read(ACPI_REGISTER_PM1_STATUS, &fixed_status);
+       (void)acpi_hw_register_read(ACPI_REGISTER_PM1_ENABLE, &fixed_enable);
 
        ACPI_DEBUG_PRINT((ACPI_DB_INTERRUPTS,
                          "Fixed Event Block: Enable %08X Status %08X\n",
@@ -261,8 +260,8 @@ u32 acpi_ev_fixed_event_detect(void)
                        enable_bit_mask)) {
 
                        /* Found an active (signalled) event */
-
-                       int_status |= acpi_ev_fixed_event_dispatch((u32) i);
+                       acpi_os_fixed_event_count(i);
+                       int_status |= acpi_ev_fixed_event_dispatch(i);
                }
        }
 
@@ -293,8 +292,8 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event)
                                status_register_id, 1);
 
        /*
-        * Make sure we've got a handler.  If not, report an error.
-        * The event is disabled to prevent further interrupts.
+        * Make sure we've got a handler. If not, report an error. The event is
+        * disabled to prevent further interrupts.
         */
        if (NULL == acpi_gbl_fixed_event_handlers[event].handler) {
                (void)acpi_set_register(acpi_gbl_fixed_event_info[event].