From: Taku Izumi Date: Thu, 20 Nov 2008 06:22:37 +0000 (+0900) Subject: PCI/ACPI: Remove unnecessary _OSC evaluation for control request X-Git-Tag: v2.6.29-rc1~181^2~79 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e0fa3b43df0b57967857b2c83bad9a5193fbddf5;p=linux-2.6-omap-h63xx.git 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 Tested-by: Andrew Patterson Signed-off-by: Kenji Kaneshige Signed-off-by: Taku Izumi Signed-off-by: Jesse Barnes --- diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index c580a525d9c..736bb248008 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))