diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-22 22:43:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-22 22:43:02 -0400 |
commit | 37c70d0d09747a958ec50aeb11ed1bf896da028c (patch) | |
tree | 5f026a3cfc7e4d4b11ca8cf7c787325bfb96e4e0 /drivers/acpi/executer/exsystem.c | |
parent | 7f52a3afc4c02db75b3953fcbbb980abc86873a2 (diff) | |
parent | cddece4beccaa72dcb57d64a7f1e496b2e61a16b (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
ACPI: IA64: fix %ll build warnings
ACPI: IA64: fix allnoconfig build
ACPI: Only use IPI on known broken machines (AMD, Dothan/BaniasPentium M)
ACPI: ibm-acpi: allow module to load when acpi notifiers can't be set (v2)
ACPI: parse 2nd MADT by default
ACPICA: revert "acpi_serialize" changes
sony-laptop: MAINTAINERS fix entry, add L: and W:
ACPI: resolve HP nx6125 S3 immediate wakeup regression
ACPI: Add support to parse 2nd MADT
Diffstat (limited to 'drivers/acpi/executer/exsystem.c')
-rw-r--r-- | drivers/acpi/executer/exsystem.c | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/drivers/acpi/executer/exsystem.c b/drivers/acpi/executer/exsystem.c index 9460baff3032..b2edf620ba89 100644 --- a/drivers/acpi/executer/exsystem.c +++ b/drivers/acpi/executer/exsystem.c | |||
@@ -66,6 +66,7 @@ ACPI_MODULE_NAME("exsystem") | |||
66 | acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) | 66 | acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) |
67 | { | 67 | { |
68 | acpi_status status; | 68 | acpi_status status; |
69 | acpi_status status2; | ||
69 | 70 | ||
70 | ACPI_FUNCTION_TRACE(ex_system_wait_semaphore); | 71 | ACPI_FUNCTION_TRACE(ex_system_wait_semaphore); |
71 | 72 | ||
@@ -78,7 +79,7 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) | |||
78 | 79 | ||
79 | /* We must wait, so unlock the interpreter */ | 80 | /* We must wait, so unlock the interpreter */ |
80 | 81 | ||
81 | acpi_ex_relinquish_interpreter(); | 82 | acpi_ex_exit_interpreter(); |
82 | 83 | ||
83 | status = acpi_os_wait_semaphore(semaphore, 1, timeout); | 84 | status = acpi_os_wait_semaphore(semaphore, 1, timeout); |
84 | 85 | ||
@@ -88,7 +89,13 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) | |||
88 | 89 | ||
89 | /* Reacquire the interpreter */ | 90 | /* Reacquire the interpreter */ |
90 | 91 | ||
91 | acpi_ex_reacquire_interpreter(); | 92 | status2 = acpi_ex_enter_interpreter(); |
93 | if (ACPI_FAILURE(status2)) { | ||
94 | |||
95 | /* Report fatal error, could not acquire interpreter */ | ||
96 | |||
97 | return_ACPI_STATUS(status2); | ||
98 | } | ||
92 | } | 99 | } |
93 | 100 | ||
94 | return_ACPI_STATUS(status); | 101 | return_ACPI_STATUS(status); |
@@ -112,6 +119,7 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) | |||
112 | acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) | 119 | acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) |
113 | { | 120 | { |
114 | acpi_status status; | 121 | acpi_status status; |
122 | acpi_status status2; | ||
115 | 123 | ||
116 | ACPI_FUNCTION_TRACE(ex_system_wait_mutex); | 124 | ACPI_FUNCTION_TRACE(ex_system_wait_mutex); |
117 | 125 | ||
@@ -124,7 +132,7 @@ acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) | |||
124 | 132 | ||
125 | /* We must wait, so unlock the interpreter */ | 133 | /* We must wait, so unlock the interpreter */ |
126 | 134 | ||
127 | acpi_ex_relinquish_interpreter(); | 135 | acpi_ex_exit_interpreter(); |
128 | 136 | ||
129 | status = acpi_os_acquire_mutex(mutex, timeout); | 137 | status = acpi_os_acquire_mutex(mutex, timeout); |
130 | 138 | ||
@@ -134,7 +142,13 @@ acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) | |||
134 | 142 | ||
135 | /* Reacquire the interpreter */ | 143 | /* Reacquire the interpreter */ |
136 | 144 | ||
137 | acpi_ex_reacquire_interpreter(); | 145 | status2 = acpi_ex_enter_interpreter(); |
146 | if (ACPI_FAILURE(status2)) { | ||
147 | |||
148 | /* Report fatal error, could not acquire interpreter */ | ||
149 | |||
150 | return_ACPI_STATUS(status2); | ||
151 | } | ||
138 | } | 152 | } |
139 | 153 | ||
140 | return_ACPI_STATUS(status); | 154 | return_ACPI_STATUS(status); |
@@ -195,18 +209,20 @@ acpi_status acpi_ex_system_do_stall(u32 how_long) | |||
195 | 209 | ||
196 | acpi_status acpi_ex_system_do_suspend(acpi_integer how_long) | 210 | acpi_status acpi_ex_system_do_suspend(acpi_integer how_long) |
197 | { | 211 | { |
212 | acpi_status status; | ||
213 | |||
198 | ACPI_FUNCTION_ENTRY(); | 214 | ACPI_FUNCTION_ENTRY(); |
199 | 215 | ||
200 | /* Since this thread will sleep, we must release the interpreter */ | 216 | /* Since this thread will sleep, we must release the interpreter */ |
201 | 217 | ||
202 | acpi_ex_relinquish_interpreter(); | 218 | acpi_ex_exit_interpreter(); |
203 | 219 | ||
204 | acpi_os_sleep(how_long); | 220 | acpi_os_sleep(how_long); |
205 | 221 | ||
206 | /* And now we must get the interpreter again */ | 222 | /* And now we must get the interpreter again */ |
207 | 223 | ||
208 | acpi_ex_reacquire_interpreter(); | 224 | status = acpi_ex_enter_interpreter(); |
209 | return (AE_OK); | 225 | return (status); |
210 | } | 226 | } |
211 | 227 | ||
212 | /******************************************************************************* | 228 | /******************************************************************************* |