Thread (1 message) 1 message, 1 author, 2010-08-03

Re: [PATCH 1/8] ACPI / PCI: Introduce acpi_pci_osc_control_query()

From: Kenji Kaneshige <hidden>
Date: 2010-08-03 05:04:06

(2010/08/03 6:53), Rafael J. Wysocki wrote:
From: Rafael J. Wysocki<redacted>
<snip.>
quoted hunk
+	mutex_lock(&osc_lock);
+	status = acpi_pci_query_osc(root, root->osc_support_set, ctrl_mask);
+	mutex_unlock(&osc_lock);
+
One more comment here.

I think we can skip acpi_pci_query_osc() if all of queried controls are
already granted to OS. Please see below

	mutex_lock(&osc_lock);
	if ((root->osc_control_set & *ctrl_mask) == *ctrl_mask) {
		*ctrl_mask = root->osc_control_set;
		goto out;
	}
	status = acpi_pci_query_osc(root, root->osc_support_set, ctrl_mask);
	mutex_unlock(&osc_lock);
out:

Thanks,
Kenji Kaneshige
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help