make acpi_path_name() global (v3)
Subsystems (2)
PATCH 1/2 make acpi_path_name() global (v3)
From: Randy Dunlap <randy_d_dunlap-VuQAYsv1563Yd54FQh9/[email protected]>
Make acpi_path_name() usable by everyone.
I need this for adding SATA suspend/resume ACPI support.
--- drivers/acpi/osl.c | 21 +++++++++++++++++++++ include/acpi/acpiosxf.h | 2 ++ 2 files changed, 23 insertions(+)
drivers/acpi/osl.c +21 -0
@@ -1078,6 +1078,27 @@ void acpi_os_release_lock(acpi_handle haspin_unlock_irqrestore ((spinlock_t *) handle, flags); } +/** +* acpi_path_name - get ACPI path_name for the given handle +* @handle: ACPI object handle to look up name of +* @namebuf: acpi_buffer with input flags and output name +* +* Caller can allocate & free the output name buffer or can set +* namebuf.length to ACPI_ALLOCATE_BUFFER to have ACPI-CA allocate +* the buffer but caller is still responsible for freeing it. +* +* Returns: status of acpi_get_name() +*/ +acpi_status acpi_path_name (acpi_handle handle,struct acpi_buffer *namebuf) +{ +acpi_status status; + + status =acpi_get_name (handle,ACPI_FULL_PATHNAME , namebuf); + +return_ACPI_STATUS (status); +} +EXPORT_SYMBOL_GPL (acpi_path_name); +#ifndef ACPI_USE_LOCAL_CACHE /*******************************************************************************
include/acpi/acpiosxf.h +2 -0
@@ -112,6 +112,8 @@ unsigned long acpi_os_acquire_lock(acpi_void acpi_os_release_lock (acpi_handle handle,unsigned long flags); +acpi_status acpi_path_name (acpi_handle handle,struct acpi_buffer *namebuf); +/* * Memory allocation and mapping */
---
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
A message that is not in the archive (sent off-list or not yet received): 20051220191828.65d0087f.rdunlap-/[email protected]
drivers/acpi/osl.c void acpi_os_release_lock(acpi_handle ha · line 1100
Quoted 9 lines · Randy.Dunlap
drivers/acpi/osl.c +9
-0+acpi_status acpi_path_name (acpi_handle handle,struct acpi_buffer *namebuf) +{ +acpi_status status; + + status =acpi_get_name (handle,ACPI_FULL_PATHNAME , namebuf); + +return_ACPI_STATUS (status); +} +EXPORT_SYMBOL_GPL (acpi_path_name);
Nope. You either need to add an "ACPI_FUNCTION_TRACE" call at the top of your function, or just do "return status;". Otherwise you'll screw up the ACPI debug code.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click