aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-11-21 00:21:39 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-11-21 00:21:39 +0100
commitf3fd0c8a7fc1e4f3107a09a75e622781d3007b56 (patch)
treed63af1d6106032a1fdbc788ef9b7805f01a05a0a /include/linux
parentACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks (diff)
downloadlinux-dev-f3fd0c8a7fc1e4f3107a09a75e622781d3007b56.tar.xz
linux-dev-f3fd0c8a7fc1e4f3107a09a75e622781d3007b56.zip
ACPI: Allow ACPI handles of devices to be initialized in advance
Currently, the ACPI handles of devices are initialized from within device_add(), by acpi_bind_one() called from acpi_platform_notify() which first uses the .find_device() routine provided by the device's bus type to find the matching device node in the ACPI namespace. This is a source of some computational overhead and, moreover, the correctness of the result depends on the implementation of .find_device() which is known to fail occasionally for some bus types (e.g. PCI). In some cases, however, the corresponding ACPI device node is known already before calling device_add() for the given struct device object and the whole .find_device() dance in acpi_platform_notify() is then simply unnecessary. For this reason, make it possible to initialize the ACPI handles of devices before calling device_add() for them. Modify acpi_platform_notify() to call acpi_bind_one() in advance to check the device's existing ACPI handle and skip the .find_device() search if that is successful. Change acpi_bind_one() accordingly. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions