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>
This commit is contained in:
Taku Izumi 2008-11-20 15:22:37 +09:00 committed by Jesse Barnes
parent 753e3aca73
commit e0fa3b43df
1 changed files with 4 additions and 0 deletions

View File

@ -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))