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>
This commit is contained in:
Bjorn Helgaas
2008-04-28 16:34:39 -06:00
committed by Len Brown
parent 01115e7d41
commit d152cf5d0c
3 changed files with 29 additions and 29 deletions

View File

@@ -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;