ACPI / dock: Rework and simplify find_dock_devices()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 30 Jun 2013 21:46:02 +0000 (23:46 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 14 Jul 2013 23:33:11 +0000 (01:33 +0200)
commit96c0a4d4902c3d5f56bde95d3e2d96689ca64b6d
treee9ef696424afa94c1c2ecc5917436c1f8d681738
parentd460acebd7959cc91e7edc594d90adb9b72a0b05
ACPI / dock: Rework and simplify find_dock_devices()

Since acpi_walk_namespace() calls find_dock_devices() during tree
pre-order visit, the latter doesn't need to add devices whose
parents have _EJD pointing to the docking station to the list of
that station's dependent devices, because those parents are going to
be added to that list anyway and the removal of a parent will take
care of the removal of its children in those cases.

For this reason, rework find_dock_devices() to only call
add_dock_dependent_device() for devices whose _EJD point directy to
the docking station represented by its context argument and simplify
it slightly.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
drivers/acpi/dock.c
This page took 0.025869 seconds and 5 git commands to generate.