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>
acpi_handle handle;
u32 support_set;
u32 control_set;
+ int is_queried;
u32 query_result;
struct list_head sibiling;
};
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;
if (!ctrlset)
return AE_TYPE;
- if (osc_data->support_set &&
+ if (osc_data->is_queried &&
((osc_data->query_result & ctrlset) != ctrlset))
return AE_SUPPORT;