aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/pnpacpi/core.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-04-28 18:34:39 -0400
committerLen Brown <len.brown@intel.com>2008-04-29 03:22:30 -0400
commitd152cf5d0c3325979e71ee53b425fdd51a1a285a (patch)
tree1a8698b8bc188c1ea222c738ec4f6339a615e5ce /drivers/pnp/pnpacpi/core.c
parent01115e7d41c4eaeffa064d818b4abbd3efa94f80 (diff)
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.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index 7e4512a60f5..0950b711f19 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -75,11 +75,8 @@ static int __init ispnpidacpi(char *id)
75 75
76static int pnpacpi_get_resources(struct pnp_dev *dev) 76static int pnpacpi_get_resources(struct pnp_dev *dev)
77{ 77{
78 acpi_status status;
79
80 dev_dbg(&dev->dev, "get resources\n"); 78 dev_dbg(&dev->dev, "get resources\n");
81 status = pnpacpi_parse_allocated_resource(dev); 79 return pnpacpi_parse_allocated_resource(dev);
82 return ACPI_FAILURE(status) ? -ENODEV : 0;
83} 80}
84 81
85static int pnpacpi_set_resources(struct pnp_dev *dev) 82static int pnpacpi_set_resources(struct pnp_dev *dev)
@@ -182,22 +179,11 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
182 else 179 else
183 strncpy(dev->name, acpi_device_bid(device), sizeof(dev->name)); 180 strncpy(dev->name, acpi_device_bid(device), sizeof(dev->name));
184 181
185 if (dev->active) { 182 if (dev->active)
186 /* parse allocated resource */ 183 pnpacpi_parse_allocated_resource(dev);
187 status = pnpacpi_parse_allocated_resource(dev);
188 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
189 pnp_err("PnPACPI: METHOD_NAME__CRS failure for %s",
190 acpi_device_hid(device));
191 }
192 }
193 184
194 if (dev->capabilities & PNP_CONFIGURABLE) { 185 if (dev->capabilities & PNP_CONFIGURABLE)
195 status = pnpacpi_parse_resource_option_data(dev); 186 pnpacpi_parse_resource_option_data(dev);
196 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
197 pnp_err("PnPACPI: METHOD_NAME__PRS failure for %s",
198 acpi_device_hid(device));
199 }
200 }
201 187
202 if (device->flags.compatible_ids) { 188 if (device->flags.compatible_ids) {
203 struct acpi_compatible_id_list *cid_list = device->pnp.cid_list; 189 struct acpi_compatible_id_list *cid_list = device->pnp.cid_list;