diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2008-05-15 15:21:16 +0900 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-06-10 10:59:48 -0700 |
commit | 681f7d9db58d2b6dc3c3b784d6815f86a53b6ba0 (patch) | |
tree | 78bfb611f150d6843892f91a3f074dea2c59ac93 /drivers/pci | |
parent | 5e0b9947452c824d66fafe728a46312cff544a7f (diff) | |
download | linux-stable-681f7d9db58d2b6dc3c3b784d6815f86a53b6ba0.tar.gz linux-stable-681f7d9db58d2b6dc3c3b784d6815f86a53b6ba0.tar.bz2 linux-stable-681f7d9db58d2b6dc3c3b784d6815f86a53b6ba0.zip |
pci-acpi: add flag to indicate query had been done
Current pci-acpi implementation checks osc_data->support_stat to see
if control bits had been already queried. It is not good from the
viewpoint of easy understanding. So this patch adds new 'is_queried'
flag to indicate query had been done.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Acked-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-acpi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index b1bd6e6155a3..951021838055 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c @@ -23,6 +23,7 @@ struct acpi_osc_data { acpi_handle handle; u32 support_set; u32 control_set; + int is_queried; u32 query_result; struct list_head sibiling; }; @@ -147,6 +148,7 @@ static acpi_status acpi_query_osc(acpi_handle handle, if (ACPI_SUCCESS(status)) { osc_data->support_set = support_set; osc_data->query_result = osc_args.query_result; + osc_data->is_queried = 1; } return status; @@ -203,7 +205,7 @@ acpi_status pci_osc_control_set(acpi_handle handle, u32 flags) if (!ctrlset) return AE_TYPE; - if (osc_data->support_set && + if (osc_data->is_queried && ((osc_data->query_result & ctrlset) != ctrlset)) return AE_SUPPORT; |