Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[sfrench/cifs-2.6.git] / drivers / acpi / hardware / hwtimer.c
index a559ac17b132760a9ab068f948b4ae715e4bd61a..c32eab696acd11f4fad79daab380c9d189faaf71 100644 (file)
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -60,13 +60,13 @@ ACPI_MODULE_NAME("hwtimer")
  ******************************************************************************/
 acpi_status acpi_get_timer_resolution(u32 * resolution)
 {
-       ACPI_FUNCTION_TRACE("acpi_get_timer_resolution");
+       ACPI_FUNCTION_TRACE(acpi_get_timer_resolution);
 
        if (!resolution) {
                return_ACPI_STATUS(AE_BAD_PARAMETER);
        }
 
-       if (acpi_gbl_FADT->tmr_val_ext == 0) {
+       if ((acpi_gbl_FADT.flags & ACPI_FADT_32BIT_TIMER) == 0) {
                *resolution = 24;
        } else {
                *resolution = 32;
@@ -92,13 +92,14 @@ acpi_status acpi_get_timer(u32 * ticks)
 {
        acpi_status status;
 
-       ACPI_FUNCTION_TRACE("acpi_get_timer");
+       ACPI_FUNCTION_TRACE(acpi_get_timer);
 
        if (!ticks) {
                return_ACPI_STATUS(AE_BAD_PARAMETER);
        }
 
-       status = acpi_hw_low_level_read(32, ticks, &acpi_gbl_FADT->xpm_tmr_blk);
+       status =
+           acpi_hw_low_level_read(32, ticks, &acpi_gbl_FADT.xpm_timer_block);
 
        return_ACPI_STATUS(status);
 }
@@ -140,7 +141,7 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed)
        u32 delta_ticks;
        acpi_integer quotient;
 
-       ACPI_FUNCTION_TRACE("acpi_get_timer_duration");
+       ACPI_FUNCTION_TRACE(acpi_get_timer_duration);
 
        if (!time_elapsed) {
                return_ACPI_STATUS(AE_BAD_PARAMETER);
@@ -153,7 +154,7 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed)
        if (start_ticks < end_ticks) {
                delta_ticks = end_ticks - start_ticks;
        } else if (start_ticks > end_ticks) {
-               if (acpi_gbl_FADT->tmr_val_ext == 0) {
+               if ((acpi_gbl_FADT.flags & ACPI_FADT_32BIT_TIMER) == 0) {
 
                        /* 24-bit Timer */