mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
ACPI / scan: Define non-empty device removal handler
If an ACPI namespace node is removed (usually, as a result of a table unload), and there is a data object attached to that node, acpi_ns_delete_node() executes the removal handler submitted to acpi_attach_data() for that object. That handler is currently empty for struct acpi_device objects, so it is necessary to detach those objects from the corresponding ACPI namespace nodes in advance every time a table unload may happen. That is cumbersome and inefficient and leads to some design constraints that turn out to be quite inconvenient (in particular, struct acpi_device objects cannot be registered for namespace nodes representing devices that are not reported as present or functional by _STA). For this reason, introduce a non-empty removal handler for ACPI device objects that will unregister them when their ACPI namespace nodes go away. This code modification alone should not change functionality except for the ordering of the ACPI hotplug workqueue which should not matter (without subsequent code changes). Signed-off-by: Rafael J. Wysocki <[email protected]> Tested-by: Mika Westerberg <[email protected]>
This commit is contained in:
parent
74fc9cb2b9
commit
d783156ea3
4 changed files with 102 additions and 21 deletions
|
|
@ -299,6 +299,7 @@ struct acpi_device {
|
|||
struct list_head children;
|
||||
struct list_head node;
|
||||
struct list_head wakeup_list;
|
||||
struct list_head del_list;
|
||||
struct acpi_device_status status;
|
||||
struct acpi_device_flags flags;
|
||||
struct acpi_device_pnp pnp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue