diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-04-28 16:34:39 -0600 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-29 03:22:30 -0400 |
commit | d152cf5d0c3325979e71ee53b425fdd51a1a285a (patch) | |
tree | 1a8698b8bc188c1ea222c738ec4f6339a615e5ce /drivers/pnp/pnpacpi/core.c | |
parent | 01115e7d41c4eaeffa064d818b4abbd3efa94f80 (diff) | |
download | op-kernel-dev-d152cf5d0c3325979e71ee53b425fdd51a1a285a.zip op-kernel-dev-d152cf5d0c3325979e71ee53b425fdd51a1a285a.tar.gz |
PNPACPI: move _CRS/_PRS warnings closer to the action
Move warnings about _CRS and _PRS problems to the place where we
actually make the ACPI calls. Then we don't have to pass around
acpi_status values any more than necessary.
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/pnpacpi/core.c')
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 7e4512a..0950b71 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c @@ -75,11 +75,8 @@ static int __init ispnpidacpi(char *id) static int pnpacpi_get_resources(struct pnp_dev *dev) { - acpi_status status; - dev_dbg(&dev->dev, "get resources\n"); - status = pnpacpi_parse_allocated_resource(dev); - return ACPI_FAILURE(status) ? -ENODEV : 0; + return pnpacpi_parse_allocated_resource(dev); } static int pnpacpi_set_resources(struct pnp_dev *dev) @@ -182,22 +179,11 @@ static int __init pnpacpi_add_device(struct acpi_device *device) else strncpy(dev->name, acpi_device_bid(device), sizeof(dev->name)); - if (dev->active) { - /* parse allocated resource */ - status = pnpacpi_parse_allocated_resource(dev); - if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { - pnp_err("PnPACPI: METHOD_NAME__CRS failure for %s", - acpi_device_hid(device)); - } - } + if (dev->active) + pnpacpi_parse_allocated_resource(dev); - if (dev->capabilities & PNP_CONFIGURABLE) { - status = pnpacpi_parse_resource_option_data(dev); - if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { - pnp_err("PnPACPI: METHOD_NAME__PRS failure for %s", - acpi_device_hid(device)); - } - } + if (dev->capabilities & PNP_CONFIGURABLE) + pnpacpi_parse_resource_option_data(dev); if (device->flags.compatible_ids) { struct acpi_compatible_id_list *cid_list = device->pnp.cid_list; |