aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/hardware/hwtimer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/hardware/hwtimer.c')
-rw-r--r--drivers/acpi/hardware/hwtimer.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/acpi/hardware/hwtimer.c b/drivers/acpi/hardware/hwtimer.c
index fc10b7cb456f..c4ec47c939fd 100644
--- a/drivers/acpi/hardware/hwtimer.c
+++ b/drivers/acpi/hardware/hwtimer.c
@@ -42,7 +42,6 @@
42 * POSSIBILITY OF SUCH DAMAGES. 42 * POSSIBILITY OF SUCH DAMAGES.
43 */ 43 */
44 44
45#include <linux/module.h>
46#include <acpi/acpi.h> 45#include <acpi/acpi.h>
47 46
48#define _COMPONENT ACPI_HARDWARE 47#define _COMPONENT ACPI_HARDWARE
@@ -61,13 +60,13 @@ ACPI_MODULE_NAME("hwtimer")
61 ******************************************************************************/ 60 ******************************************************************************/
62acpi_status acpi_get_timer_resolution(u32 * resolution) 61acpi_status acpi_get_timer_resolution(u32 * resolution)
63{ 62{
64 ACPI_FUNCTION_TRACE("acpi_get_timer_resolution"); 63 ACPI_FUNCTION_TRACE(acpi_get_timer_resolution);
65 64
66 if (!resolution) { 65 if (!resolution) {
67 return_ACPI_STATUS(AE_BAD_PARAMETER); 66 return_ACPI_STATUS(AE_BAD_PARAMETER);
68 } 67 }
69 68
70 if (0 == acpi_gbl_FADT->tmr_val_ext) { 69 if (acpi_gbl_FADT->tmr_val_ext == 0) {
71 *resolution = 24; 70 *resolution = 24;
72 } else { 71 } else {
73 *resolution = 32; 72 *resolution = 32;
@@ -76,6 +75,8 @@ acpi_status acpi_get_timer_resolution(u32 * resolution)
76 return_ACPI_STATUS(AE_OK); 75 return_ACPI_STATUS(AE_OK);
77} 76}
78 77
78ACPI_EXPORT_SYMBOL(acpi_get_timer_resolution)
79
79/****************************************************************************** 80/******************************************************************************
80 * 81 *
81 * FUNCTION: acpi_get_timer 82 * FUNCTION: acpi_get_timer
@@ -87,12 +88,11 @@ acpi_status acpi_get_timer_resolution(u32 * resolution)
87 * DESCRIPTION: Obtains current value of ACPI PM Timer (in ticks). 88 * DESCRIPTION: Obtains current value of ACPI PM Timer (in ticks).
88 * 89 *
89 ******************************************************************************/ 90 ******************************************************************************/
90
91acpi_status acpi_get_timer(u32 * ticks) 91acpi_status acpi_get_timer(u32 * ticks)
92{ 92{
93 acpi_status status; 93 acpi_status status;
94 94
95 ACPI_FUNCTION_TRACE("acpi_get_timer"); 95 ACPI_FUNCTION_TRACE(acpi_get_timer);
96 96
97 if (!ticks) { 97 if (!ticks) {
98 return_ACPI_STATUS(AE_BAD_PARAMETER); 98 return_ACPI_STATUS(AE_BAD_PARAMETER);
@@ -103,7 +103,7 @@ acpi_status acpi_get_timer(u32 * ticks)
103 return_ACPI_STATUS(status); 103 return_ACPI_STATUS(status);
104} 104}
105 105
106EXPORT_SYMBOL(acpi_get_timer); 106ACPI_EXPORT_SYMBOL(acpi_get_timer)
107 107
108/****************************************************************************** 108/******************************************************************************
109 * 109 *
@@ -133,7 +133,6 @@ EXPORT_SYMBOL(acpi_get_timer);
133 * 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes 133 * 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes
134 * 134 *
135 ******************************************************************************/ 135 ******************************************************************************/
136
137acpi_status 136acpi_status
138acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed) 137acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed)
139{ 138{
@@ -141,7 +140,7 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed)
141 u32 delta_ticks; 140 u32 delta_ticks;
142 acpi_integer quotient; 141 acpi_integer quotient;
143 142
144 ACPI_FUNCTION_TRACE("acpi_get_timer_duration"); 143 ACPI_FUNCTION_TRACE(acpi_get_timer_duration);
145 144
146 if (!time_elapsed) { 145 if (!time_elapsed) {
147 return_ACPI_STATUS(AE_BAD_PARAMETER); 146 return_ACPI_STATUS(AE_BAD_PARAMETER);
@@ -154,7 +153,8 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed)
154 if (start_ticks < end_ticks) { 153 if (start_ticks < end_ticks) {
155 delta_ticks = end_ticks - start_ticks; 154 delta_ticks = end_ticks - start_ticks;
156 } else if (start_ticks > end_ticks) { 155 } else if (start_ticks > end_ticks) {
157 if (0 == acpi_gbl_FADT->tmr_val_ext) { 156 if (acpi_gbl_FADT->tmr_val_ext == 0) {
157
158 /* 24-bit Timer */ 158 /* 24-bit Timer */
159 159
160 delta_ticks = 160 delta_ticks =
@@ -183,4 +183,4 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed)
183 return_ACPI_STATUS(status); 183 return_ACPI_STATUS(status);
184} 184}
185 185
186EXPORT_SYMBOL(acpi_get_timer_duration); 186ACPI_EXPORT_SYMBOL(acpi_get_timer_duration)