Pull ec into release branch
[sfrench/cifs-2.6.git] / drivers / acpi / hardware / hwacpi.c
index 1bb3463d7040ae6b5913a8863999bff17e920543..de50fab2a91066f2c23afe2087a1bbc02ab0b9a2 100644 (file)
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2005, R. Byron Moore
+ * Copyright (C) 2000 - 2006, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -63,13 +63,12 @@ acpi_status acpi_hw_initialize(void)
 {
        acpi_status status;
 
-       ACPI_FUNCTION_TRACE("hw_initialize");
+       ACPI_FUNCTION_TRACE(hw_initialize);
 
        /* We must have the ACPI tables by the time we get here */
 
        if (!acpi_gbl_FADT) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "No FADT is present\n"));
-
+               ACPI_ERROR((AE_INFO, "No FADT is present"));
                return_ACPI_STATUS(AE_NO_ACPI_TABLES);
        }
 
@@ -101,14 +100,15 @@ acpi_status acpi_hw_set_mode(u32 mode)
        acpi_status status;
        u32 retry;
 
-       ACPI_FUNCTION_TRACE("hw_set_mode");
+       ACPI_FUNCTION_TRACE(hw_set_mode);
 
        /*
         * ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
         * system does not support mode transition.
         */
        if (!acpi_gbl_FADT->smi_cmd) {
-               ACPI_REPORT_ERROR(("No SMI_CMD in FADT, mode transition failed.\n"));
+               ACPI_ERROR((AE_INFO,
+                           "No SMI_CMD in FADT, mode transition failed"));
                return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE);
        }
 
@@ -120,7 +120,8 @@ acpi_status acpi_hw_set_mode(u32 mode)
         * transitions are not supported.
         */
        if (!acpi_gbl_FADT->acpi_enable && !acpi_gbl_FADT->acpi_disable) {
-               ACPI_REPORT_ERROR(("No ACPI mode transition supported in this system (enable/disable both zero)\n"));
+               ACPI_ERROR((AE_INFO,
+                           "No ACPI mode transition supported in this system (enable/disable both zero)"));
                return_ACPI_STATUS(AE_OK);
        }
 
@@ -154,8 +155,8 @@ acpi_status acpi_hw_set_mode(u32 mode)
        }
 
        if (ACPI_FAILURE(status)) {
-               ACPI_REPORT_ERROR(("Could not write mode change, %s\n",
-                                  acpi_format_exception(status)));
+               ACPI_EXCEPTION((AE_INFO, status,
+                               "Could not write ACPI mode change"));
                return_ACPI_STATUS(status);
        }
 
@@ -175,7 +176,7 @@ acpi_status acpi_hw_set_mode(u32 mode)
                retry--;
        }
 
-       ACPI_REPORT_ERROR(("Hardware never changed modes\n"));
+       ACPI_ERROR((AE_INFO, "Hardware did not change modes"));
        return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE);
 }
 
@@ -197,25 +198,25 @@ u32 acpi_hw_get_mode(void)
        acpi_status status;
        u32 value;
 
-       ACPI_FUNCTION_TRACE("hw_get_mode");
+       ACPI_FUNCTION_TRACE(hw_get_mode);
 
        /*
         * ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
         * system does not support mode transition.
         */
        if (!acpi_gbl_FADT->smi_cmd) {
-               return_VALUE(ACPI_SYS_MODE_ACPI);
+               return_UINT32(ACPI_SYS_MODE_ACPI);
        }
 
        status =
            acpi_get_register(ACPI_BITREG_SCI_ENABLE, &value, ACPI_MTX_LOCK);
        if (ACPI_FAILURE(status)) {
-               return_VALUE(ACPI_SYS_MODE_LEGACY);
+               return_UINT32(ACPI_SYS_MODE_LEGACY);
        }
 
        if (value) {
-               return_VALUE(ACPI_SYS_MODE_ACPI);
+               return_UINT32(ACPI_SYS_MODE_ACPI);
        } else {
-               return_VALUE(ACPI_SYS_MODE_LEGACY);
+               return_UINT32(ACPI_SYS_MODE_LEGACY);
        }
 }