public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] make acpi_path_name() global (v3)
@ 2005-12-21  3:18 Randy.Dunlap
       [not found] ` <20051220191828.65d0087f.rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Randy.Dunlap @ 2005-12-21  3:18 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	pcihpd-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: kristen.c.accardi-ral2JQCrhuEAvxtiuMwx3w,
	len.brown-ral2JQCrhuEAvxtiuMwx3w, gregkh-l3A5Bk7waGM,
	robert.moore-ral2JQCrhuEAvxtiuMwx3w

From: Randy Dunlap <randy_d_dunlap-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

Make acpi_path_name() usable by everyone.
I need this for adding SATA suspend/resume ACPI support.

Signed-off-by: Randy Dunlap <randy_d_dunlap-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
 drivers/acpi/osl.c      |   21 +++++++++++++++++++++
 include/acpi/acpiosxf.h |    2 ++
 2 files changed, 23 insertions(+)

--- linux-2615-rc6-acpi.orig/drivers/acpi/osl.c
+++ linux-2615-rc6-acpi/drivers/acpi/osl.c
@@ -1078,6 +1078,27 @@ void acpi_os_release_lock(acpi_handle ha
 	spin_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
 
 /*******************************************************************************
--- linux-2615-rc6-acpi.orig/include/acpi/acpiosxf.h
+++ linux-2615-rc6-acpi/include/acpi/acpiosxf.h
@@ -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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] make acpi_path_name() global (v3)
       [not found] ` <20051220191828.65d0087f.rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>
@ 2005-12-21 12:44   ` Matthew Wilcox
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2005-12-21 12:44 UTC (permalink / raw)
  To: Randy.Dunlap
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	pcihpd-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	kristen.c.accardi-ral2JQCrhuEAvxtiuMwx3w,
	len.brown-ral2JQCrhuEAvxtiuMwx3w, gregkh-l3A5Bk7waGM,
	robert.moore-ral2JQCrhuEAvxtiuMwx3w

On Tue, Dec 20, 2005 at 07:18:28PM -0800, Randy.Dunlap wrote:
> +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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-21 12:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-21  3:18 [PATCH 1/2] make acpi_path_name() global (v3) Randy.Dunlap
     [not found] ` <20051220191828.65d0087f.rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>
2005-12-21 12:44   ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox