diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2010-06-30 23:07:20 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-07-06 22:34:27 -0400 |
commit | 546eb57695875712f676e5f729159b0779f1c0af (patch) | |
tree | 1f8da8d567b75fa1fb821b059f682d4bae92ce8e /drivers/acpi | |
parent | 3bd741bd0dfcc1845ae6892baa5192c91addc84c (diff) |
ACPICA: Drop acpi_set_gpe
The acpi_set_gpe() function is a little awkward, because it doesn't
really work as advertised in the "disable" case. Namely, if a GPE
has been enabled with acpi_enable_gpe() and triggered a notification
to occur, and if acpi_set_gpe() is used to disable it before
acpi_ev_asynch_enable_gpe() runs, the GPE will be immediately enabled
by the latter as though the acpi_set_gpe() had no effect.
Thus, since it's been possible to make all of its callers use
alternative operations to disable or enable GPEs, acpi_set_gpe() can
be dropped.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpica/evxfevnt.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/drivers/acpi/acpica/evxfevnt.c b/drivers/acpi/acpica/evxfevnt.c index b094cc0183d7..fda5b44a5567 100644 --- a/drivers/acpi/acpica/evxfevnt.c +++ b/drivers/acpi/acpica/evxfevnt.c | |||
@@ -210,66 +210,6 @@ ACPI_EXPORT_SYMBOL(acpi_enable_event) | |||
210 | 210 | ||
211 | /******************************************************************************* | 211 | /******************************************************************************* |
212 | * | 212 | * |
213 | * FUNCTION: acpi_set_gpe | ||
214 | * | ||
215 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 | ||
216 | * gpe_number - GPE level within the GPE block | ||
217 | * action - ACPI_GPE_ENABLE or ACPI_GPE_DISABLE | ||
218 | * | ||
219 | * RETURN: Status | ||
220 | * | ||
221 | * DESCRIPTION: Enable or disable an individual GPE. This function bypasses | ||
222 | * the reference count mechanism used in the acpi_enable_gpe and | ||
223 | * acpi_disable_gpe interfaces -- and should be used with care. | ||
224 | * | ||
225 | * Note: Typically used to disable a runtime GPE for short period of time, | ||
226 | * then re-enable it, without disturbing the existing reference counts. This | ||
227 | * is useful, for example, in the Embedded Controller (EC) driver. | ||
228 | * | ||
229 | ******************************************************************************/ | ||
230 | acpi_status acpi_set_gpe(acpi_handle gpe_device, u32 gpe_number, u8 action) | ||
231 | { | ||
232 | struct acpi_gpe_event_info *gpe_event_info; | ||
233 | acpi_status status; | ||
234 | acpi_cpu_flags flags; | ||
235 | |||
236 | ACPI_FUNCTION_TRACE(acpi_set_gpe); | ||
237 | |||
238 | flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); | ||
239 | |||
240 | /* Ensure that we have a valid GPE number */ | ||
241 | |||
242 | gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number); | ||
243 | if (!gpe_event_info) { | ||
244 | status = AE_BAD_PARAMETER; | ||
245 | goto unlock_and_exit; | ||
246 | } | ||
247 | |||
248 | /* Perform the action */ | ||
249 | |||
250 | switch (action) { | ||
251 | case ACPI_GPE_ENABLE: | ||
252 | status = acpi_ev_enable_gpe(gpe_event_info); | ||
253 | break; | ||
254 | |||
255 | case ACPI_GPE_DISABLE: | ||
256 | status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_DISABLE); | ||
257 | break; | ||
258 | |||
259 | default: | ||
260 | status = AE_BAD_PARAMETER; | ||
261 | break; | ||
262 | } | ||
263 | |||
264 | unlock_and_exit: | ||
265 | acpi_os_release_lock(acpi_gbl_gpe_lock, flags); | ||
266 | return_ACPI_STATUS(status); | ||
267 | } | ||
268 | |||
269 | ACPI_EXPORT_SYMBOL(acpi_set_gpe) | ||
270 | |||
271 | /******************************************************************************* | ||
272 | * | ||
273 | * FUNCTION: acpi_gpe_wakeup | 213 | * FUNCTION: acpi_gpe_wakeup |
274 | * | 214 | * |
275 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 | 215 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 |