Stop passing around struct pnp_resource_table pointers. In most cases,
the caller doesn't need to know how the resources are stored inside
the struct pnp_dev.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
---
drivers/pnp/isapnp/core.c | 6 ++--
drivers/pnp/pnpacpi/core.c | 11 ++-----
drivers/pnp/pnpacpi/pnpacpi.h | 6 ++--
drivers/pnp/pnpacpi/rsparser.c | 55 +++++++++++++++++++++-----------------
drivers/pnp/pnpbios/core.c | 4 +-
drivers/pnp/pnpbios/pnpbios.h | 4 +-
drivers/pnp/pnpbios/rsparser.c | 58 ++++++++++++++++++++---------------------
7 files changed, 73 insertions(+), 71 deletions(-)
Index: work7/drivers/pnp/isapnp/core.c
===================================================================
--- work7.orig/drivers/pnp/isapnp/core.c 2008-03-31 17:10:39.000000000 -0600
+++ work7/drivers/pnp/isapnp/core.c 2008-03-31 17:10:45.000000000 -0600
@@ -924,9 +924,9 @@
EXPORT_SYMBOL(isapnp_cfg_end);
EXPORT_SYMBOL(isapnp_write_byte);
-static int isapnp_read_resources(struct pnp_dev *dev,
- struct pnp_resource_table *res)
+static int isapnp_read_resources(struct pnp_dev *dev)
{
+ struct pnp_resource_table *res = &dev->res;
int tmp, ret;
dev->active = isapnp_read_byte(ISAPNP_CFG_ACTIVATE);
@@ -974,7 +974,7 @@
pnp_init_resource_table(&dev->res);
isapnp_cfg_begin(dev->card->number, dev->number);
- ret = isapnp_read_resources(dev, &dev->res);
+ ret = isapnp_read_resources(dev);
isapnp_cfg_end();
return ret;
}
Index: work7/drivers/pnp/pnpacpi/core.c
===================================================================
--- work7.orig/drivers/pnp/pnpacpi/core.c 2008-03-31 17:10:39.000000000 -0600
+++ work7/drivers/pnp/pnpacpi/core.c 2008-03-31 17:10:45.000000000 -0600
@@ -77,8 +77,7 @@
{
acpi_status status;
- status = pnpacpi_parse_allocated_resource((acpi_handle) dev->data,
- &dev->res);
+ status = pnpacpi_parse_allocated_resource(dev);
return ACPI_FAILURE(status) ? -ENODEV : 0;
}
...