diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-04-28 18:34:09 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-29 03:22:22 -0400 |
commit | f44900020926b2cb06b87f0f52643d6285514fc3 (patch) | |
tree | 081893ba769b0f89e03832995839cfea30fcf5f9 /drivers/pnp/pnpbios | |
parent | 81b5c75f0ed22a93c3da00650d0898eec56e1d62 (diff) |
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 <bjorn.helgaas@hp.com>
Acked-By: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pnp/pnpbios')
-rw-r--r-- | drivers/pnp/pnpbios/core.c | 2 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/rsparser.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c index 76d398531da6..f5477ca85956 100644 --- a/drivers/pnp/pnpbios/core.c +++ b/drivers/pnp/pnpbios/core.c | |||
@@ -347,7 +347,7 @@ static int __init insert_device(struct pnp_bios_node *node) | |||
347 | 347 | ||
348 | /* clear out the damaged flags */ | 348 | /* clear out the damaged flags */ |
349 | if (!dev->active) | 349 | if (!dev->active) |
350 | pnp_init_resource_table(&dev->res); | 350 | pnp_init_resources(dev); |
351 | 351 | ||
352 | pnp_add_device(dev); | 352 | pnp_add_device(dev); |
353 | pnpbios_interface_attach_device(node); | 353 | pnpbios_interface_attach_device(node); |
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c index 7428f62db4d2..e90a3d4360b2 100644 --- a/drivers/pnp/pnpbios/rsparser.c +++ b/drivers/pnp/pnpbios/rsparser.c | |||
@@ -145,8 +145,7 @@ static unsigned char *pnpbios_parse_allocated_resource_data(struct pnp_dev *dev, | |||
145 | 145 | ||
146 | dev_dbg(&dev->dev, "parse allocated resources\n"); | 146 | dev_dbg(&dev->dev, "parse allocated resources\n"); |
147 | 147 | ||
148 | /* Blank the resource table values */ | 148 | pnp_init_resources(dev); |
149 | pnp_init_resource_table(&dev->res); | ||
150 | 149 | ||
151 | while ((char *)p < (char *)end) { | 150 | while ((char *)p < (char *)end) { |
152 | 151 | ||