summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-acpi.c
diff options
context:
space:
mode:
authorTaku Izumi <izumi.taku@jp.fujitsu.com>2008-11-20 07:22:37 +0100
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-01-07 20:12:35 +0100
commite0fa3b43df0b57967857b2c83bad9a5193fbddf5 (patch)
tree47ebb848837d834a755b3b7facdf3707dd8f5c81 /drivers/pci/pci-acpi.c
parentPCI: revert additional _OSC evaluation (diff)
downloadlinux-e0fa3b43df0b57967857b2c83bad9a5193fbddf5.tar.xz
linux-e0fa3b43df0b57967857b2c83bad9a5193fbddf5.zip
PCI/ACPI: Remove unnecessary _OSC evaluation for control request
If a control had already been granted, we don't need to re-evaluate _OSC for it because firmware may not reject control of any feature it has previously granted control to. Reviewed-by: Andrew Patterson <andrew.patterson@hp.com> Tested-by: Andrew Patterson <andrew.patterson@hp.com> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pci-acpi.c')
-rw-r--r--drivers/pci/pci-acpi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index c580a525d9ce..736bb248008e 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -210,6 +210,10 @@ acpi_status pci_osc_control_set(acpi_handle handle, u32 flags)
goto out;
}
+ /* No need to evaluate _OSC if the control was already granted. */
+ if ((osc_data->control_set & ctrlset) == ctrlset)
+ goto out;
+
if (!osc_data->is_queried) {
status = __acpi_query_osc(osc_data->support_set, osc_data);
if (ACPI_FAILURE(status))