ACPI: scan: Extend acpi_walk_dep_device_list()
authorDaniel Scally <djrscally@gmail.com>
Thu, 3 Jun 2021 22:40:02 +0000 (23:40 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 7 Jun 2021 14:45:05 +0000 (16:45 +0200)
commita9e10e58730432e5de840eb3ddd55c75f29341b3
treeebff977d1bb1207a9a278b072b5f0d30be7f3e0f
parent6d27975851b134be8d2a170437210c9719e524aa
ACPI: scan: Extend acpi_walk_dep_device_list()

The acpi_walk_dep_device_list() function is not as generic as its
name implies, serving only to decrement the dependency count for each
dependent device of the input.

Extend it to accept a callback which can be applied to all the
dependencies in acpi_dep_list.

Replace all existing calls to the function with calls to a wrapper,
passing a callback that applies the same dependency reduction.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Maximilian Luz <luzmaximilian@gmail.com> # for platform/surface parts
Signed-off-by: Daniel Scally <djrscally@gmail.com>
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ec.c
drivers/acpi/pmic/intel_pmic_chtdc_ti.c
drivers/acpi/scan.c
drivers/gpio/gpiolib-acpi.c
drivers/i2c/i2c-core-acpi.c
drivers/platform/surface/aggregator/core.c
drivers/platform/surface/surface3_power.c
drivers/platform/surface/surface_acpi_notify.c
include/acpi/acpi_bus.h
include/linux/acpi.h