summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-05-10 19:53:18 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-05-17 16:26:25 +0200
commit6d27975851b134be8d2a170437210c9719e524aa (patch)
tree714295ab4417d8c59abc0cc1af12b5c429ee8bcb /drivers/i2c
parentd07f6ca923ea0927a1024dfccafc5b53b61cfecc (diff)
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/i2c')
0 files changed, 0 insertions, 0 deletions