Skip to content
Commit 96c0a4d4 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarYinghai Lu <yinghai@kernel.org>
parent d460aceb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment