ACPI: PM: Simplify and fix PM domain hibernation callbacks
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 1 Jul 2019 10:54:10 +0000 (12:54 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 2 Jul 2019 22:13:24 +0000 (00:13 +0200)
commit3cd7957e85e67120bb9f6bfb75d81dcc19af282b
treeb5e9da69765e55e66f9162d502b726fc273614fe
parenta78ae45a795aa579efa4094729073bbdab02da25
ACPI: PM: Simplify and fix PM domain hibernation callbacks

First, after a previous change causing all runtime-suspended devices
in the ACPI PM domain (and ACPI LPSS devices) to be resumed before
creating a snapshot image of memory during hibernation, it is not
necessary to worry about the case in which them might be left in
runtime-suspend any more, so get rid of the code related to that from
ACPI PM domain and ACPI LPSS hibernation callbacks.

Second, it is not correct to use pm_generic_resume_early() and
acpi_subsys_resume_noirq() in hibernation "restore" callbacks (which
currently happens in the ACPI PM domain and ACPI LPSS), so introduce
proper _restore_late and _restore_noirq callbacks for the ACPI PM
domain and ACPI LPSS.

Fixes: 05087360fd7a (ACPI / PM: Take SMART_SUSPEND driver flag into account)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
drivers/acpi/acpi_lpss.c
drivers/acpi/device_pm.c
include/linux/acpi.h