ACPI / MMC: PM: Unify fixing up device power
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 13 Jun 2022 18:36:06 +0000 (20:36 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 23 Jun 2022 18:53:55 +0000 (20:53 +0200)
commita22f18bddd824e96db839ccda75ff7e035e938ca
tree950ff2e03c606c8b6c442cfa99c344d494b2e59e
parent9089d1a41aab0298aaed04f24572035db351db7b
ACPI / MMC: PM: Unify fixing up device power

Introduce acpi_device_fix_up_power_extended() for fixing up power of
a device having an ACPI companion in a manner that takes the device's
children into account and make the MMC code use it in two places
instead of walking the list of the device ACPI companion's children
directly.

This will help to eliminate the children list head from struct
acpi_device as it is redundant and it is used in questionable ways
in some places (in particular, locking is needed for walking the
list pointed to it safely, but it is often missing).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/acpi/device_pm.c
drivers/mmc/host/sdhci-acpi.c
drivers/mmc/host/sdhci-pci-core.c
include/acpi/acpi_bus.h