diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-05-10 20:53:18 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-05-17 17:26:25 +0300 |
commit | 6d27975851b134be8d2a170437210c9719e524aa (patch) | |
tree | 714295ab4417d8c59abc0cc1af12b5c429ee8bcb /drivers/acpi/ec.c | |
parent | d07f6ca923ea0927a1024dfccafc5b53b61cfecc (diff) | |
download | linux-6d27975851b134be8d2a170437210c9719e524aa.tar.xz |
ACPI: scan: Rearrange dep_unmet initialization
The dep_unmet field in struct acpi_device is used to store the
number of unresolved _DEP dependencies (that is, operation region
dependencies for which there are no drivers present) for the ACPI
device object represented by it.
That field is initialized to 1 for all ACPI device objects in
acpi_add_single_object(), via acpi_init_device_object(), so as to
avoid evaluating _STA prematurely for battery device objects in
acpi_scan_init_status(), and it is "fixed up" in acpi_bus_check_add()
after the acpi_add_single_object() called by it has returned.
This is not particularly straightforward and causes dep_unmet to
remain 1 for device objects without dependencies created by invoking
acpi_add_single_object() directly, outside acpi_bus_check_add().
For this reason, rearrange acpi_add_single_object() to initialize
dep_unmet completely before calling acpi_scan_init_status(), which
requires passing one extra bool argument to it, and update all of
its callers accordingly.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/acpi/ec.c')
0 files changed, 0 insertions, 0 deletions