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-Url: https://git.stricted.de/?a=commitdiff_plain;h=e0fa3b43df0b57967857b2c83bad9a5193fbddf5;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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 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))