Commit Graph

5 Commits

Author SHA1 Message Date
jruoho a9db528e18 Rename acpi_get_node() to acpi_match_node() for consistency. 2011-06-21 03:37:21 +00:00
jruoho 0f056e49c5 Add two new functions, acpi_match_cpu_info() and acpi_match_cpu_handle(),
which will match a given struct cpu_info with the corresponding ACPI handle,
and vice versa.
2011-06-20 15:31:52 +00:00
jruoho 5e449c623c Use the new ACPICA functions AcpiAttachData() and AcpiGetData() to associate
all "struct acpi_devnodes" to their corresponding ACPI_HANDLEs. Anywhere in
the acpi(4) subtree, the node-structure can be obtained from a handle via
acpi_get_node(). The idea is similar to e.g. device_private().

Benefits: (a) simplifies code, (b) avoids issues with locking as ACPICA does
the serialization for us, (c) avoids the need to access the glocal softc, and
(d) avoids the O(n) loop required to search for a handle from the node queue.
2010-06-07 17:13:52 +00:00
jruoho 83caa2c18b Add utility function acpi_get_node().
This retrieves a struct acpi_devnode from a handle. Since this requires
accessing the global softc, it is better to do it in one place alone. The
same goes for possible locking of the node-queue; it is better not to
publicize such a lock for generic device drivers.
2010-04-24 06:57:10 +00:00
jruoho 0c88d0e418 Reorganize the main file: add several missing prototypes, move the functions
around so that they appear in their logical order and place, etc. In
addition, split the utility functions to a separate file.

No functional change. Ok jmcneill@.
2010-04-14 17:12:14 +00:00