From f44900020926b2cb06b87f0f52643d6285514fc3 Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Mon, 28 Apr 2008 16:34:09 -0600 Subject: PNP: add pnp_init_resources(struct pnp_dev *) interface Add pnp_init_resources(struct pnp_dev *) to replace pnp_init_resource_table(), which takes a pointer to the pnp_resource_table itself. Passing only the pnp_dev * reduces the possibility for error in the caller and removes the pnp_resource_table implementation detail from the interface. Even though pnp_init_resource_table() is exported, I did not export pnp_init_resources() because it is used only by the PNP core. Signed-off-by: Bjorn Helgaas Acked-By: Rene Herman Signed-off-by: Len Brown --- drivers/pnp/pnpacpi/core.c | 2 +- drivers/pnp/pnpacpi/rsparser.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/pnp/pnpacpi') diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 1ac894d2df5a..7e4512a60f58 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c @@ -212,7 +212,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device) /* clear out the damaged flags */ if (!dev->active) - pnp_init_resource_table(&dev->res); + pnp_init_resources(dev); pnp_add_device(dev); num++; diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index c5adf7631ac2..33dbf3644f2b 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c @@ -410,8 +410,7 @@ acpi_status pnpacpi_parse_allocated_resource(struct pnp_dev *dev) dev_dbg(&dev->dev, "parse allocated resources\n"); - /* Blank the resource table values */ - pnp_init_resource_table(&dev->res); + pnp_init_resources(dev); return acpi_walk_resources(handle, METHOD_NAME__CRS, pnpacpi_allocated_resource, dev); -- cgit v1.2.1