aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-09-05 17:07:41 -0400
committerBjorn Helgaas <bhelgaas@google.com>2013-09-23 19:40:46 -0400
commit4ffe6e54b0ce259d254e7740a7a4a99dad14a484 (patch)
tree2b2004a308020093e6a9b3a5642951ce63351764
parent7dab9ef4f0823072a3c9afdb3b373c9f2f38848b (diff)
PCI/ACPI: Drop unnecessary _OSC existence tests
There's no need to check whether _OSC exists here; we eventually call acpi_evaluate_object(..., "_OSC", ...), and that will fail gracefully if _OSC doesn't exist. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/pci_root.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 28dd55509789..cc87cc4fea0e 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -180,11 +180,7 @@ static acpi_status acpi_pci_query_osc(struct acpi_pci_root *root,
180static acpi_status acpi_pci_osc_support(struct acpi_pci_root *root, u32 flags) 180static acpi_status acpi_pci_osc_support(struct acpi_pci_root *root, u32 flags)
181{ 181{
182 acpi_status status; 182 acpi_status status;
183 acpi_handle tmp;
184 183
185 status = acpi_get_handle(root->device->handle, "_OSC", &tmp);
186 if (ACPI_FAILURE(status))
187 return status;
188 mutex_lock(&osc_lock); 184 mutex_lock(&osc_lock);
189 status = acpi_pci_query_osc(root, flags, NULL); 185 status = acpi_pci_query_osc(root, flags, NULL);
190 mutex_unlock(&osc_lock); 186 mutex_unlock(&osc_lock);
@@ -316,9 +312,8 @@ EXPORT_SYMBOL_GPL(acpi_get_pci_dev);
316acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 *mask, u32 req) 312acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 *mask, u32 req)
317{ 313{
318 struct acpi_pci_root *root; 314 struct acpi_pci_root *root;
319 acpi_status status; 315 acpi_status status = AE_OK;
320 u32 ctrl, capbuf[3]; 316 u32 ctrl, capbuf[3];
321 acpi_handle tmp;
322 317
323 if (!mask) 318 if (!mask)
324 return AE_BAD_PARAMETER; 319 return AE_BAD_PARAMETER;
@@ -331,10 +326,6 @@ acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 *mask, u32 req)
331 if (!root) 326 if (!root)
332 return AE_NOT_EXIST; 327 return AE_NOT_EXIST;
333 328
334 status = acpi_get_handle(handle, "_OSC", &tmp);
335 if (ACPI_FAILURE(status))
336 return status;
337
338 mutex_lock(&osc_lock); 329 mutex_lock(&osc_lock);
339 330
340 *mask = ctrl | root->osc_control_set; 331 *mask = ctrl | root->osc_control_set;