Pass the pnp_dev pointer when possible instead of the acpi_handle.
This allows better error messages and reduces the chance of error
in the caller.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-By: Rene Herman <rene.herman@gmail.com>
Index: work10/drivers/pnp/pnpacpi/core.c
===================================================================
--- work10.orig/drivers/pnp/pnpacpi/core.c 2008-04-28 16:09:12.000000000 -0600
+++ work10/drivers/pnp/pnpacpi/core.c 2008-04-28 16:09:18.000000000 -0600
@@ -88,10 +88,10 @@
{
acpi_handle handle = dev->data;
struct acpi_buffer buffer;
- int ret = 0;
+ int ret;
acpi_status status;
- ret = pnpacpi_build_resource_template(handle, &buffer);
+ ret = pnpacpi_build_resource_template(dev, &buffer);
if (ret)
return ret;
ret = pnpacpi_encode_resources(res, &buffer);
Index: work10/drivers/pnp/pnpacpi/pnpacpi.h
===================================================================
--- work10.orig/drivers/pnp/pnpacpi/pnpacpi.h 2008-04-28 15:57:04.000000000 -0600
+++ work10/drivers/pnp/pnpacpi/pnpacpi.h 2008-04-28 16:09:18.000000000 -0600
@@ -8,5 +8,5 @@
acpi_status pnpacpi_parse_allocated_resource(acpi_handle, struct pnp_resource_table*);
acpi_status pnpacpi_parse_resource_option_data(acpi_handle, struct pnp_dev*);
int pnpacpi_encode_resources(struct pnp_resource_table *, struct acpi_buffer *);
-int pnpacpi_build_resource_template(acpi_handle, struct acpi_buffer*);
+int pnpacpi_build_resource_template(struct pnp_dev *, struct acpi_buffer *);
#endif
Index: work10/drivers/pnp/pnpacpi/rsparser.c
===================================================================
--- work10.orig/drivers/pnp/pnpacpi/rsparser.c 2008-04-28 16:09:17.000000000 -0600
+++ work10/drivers/pnp/pnpacpi/rsparser.c 2008-04-28 16:09:18.000000000 -0600
@@ -777,9 +777,10 @@
return AE_OK;
}
-int pnpacpi_build_resource_template(acpi_handle handle,
+int pnpacpi_build_resource_template(struct pnp_dev *dev,
struct acpi_buffer *buffer)
{
+ acpi_handle handle = dev->data;
struct acpi_resource *resource;
int res_cnt = 0;
acpi_status status;
--
--
| Linus Torvalds | Linux 2.6.25-rc2 |
| Robin Lee Powell | NFS hang + umount -f: better behaviour requested. |
| David Woodhouse | Re: [GIT *] Allow request_firmware() to be satisfied from in-kernel, use it in mor... |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Miles Bader | way to automatically add untracked files? |
| Jan-Benedict Glaw | Errors GITtifying GCC and Binutils |
| Andreas Hildebrandt | CVS-$Id:$ replacement in git? |
| Alexander Gladysh | [Q] Encrypted GIT? |
| Alex Thurlow | Router performance on OpenBSD and OpenBGPD |
| Karel Kulhavy | lookup option in /etc/resolv.conf ignored |
| Richard Stallman | Real men don't attack straw men |
| Sunnz | Can OpenBSD do what BusyBox does? |
| Julius Volz | [PATCH RFC 02/24] IPVS: Add genetlink interface implementation |
| Lennart Sorensen | Re: [PATCH 1/2] IPV4: remove addresses and routes when carrier is lost |
| Jussi Kivilinna | [PATCH 04/14] [rndis_host] Halt device if rndis_bind fails. |
| Lennert Buytenhek | Re: using software TSO on non-TSO capable netdevices |
