[PATCH 3/5] pci-acpi: add flag to indicate query had been done

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---
 drivers/pci/pci-acpi.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6.26-rc2-git3/drivers/pci/pci-acpi.c
===================================================================
--- linux-2.6.26-rc2-git3.orig/drivers/pci/pci-acpi.c
+++ linux-2.6.26-rc2-git3/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_h
 	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_han
 	if (!ctrlset)
 		return AE_TYPE;
 
-	if (osc_data->support_set &&
+	if (osc_data->is_queried &&
 	    ((osc_data->query_result & ctrlset) != ctrlset))
 		return AE_SUPPORT;
 


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux