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.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -918,26 +918,16 @@ int acpi_subsys_prepare(struct device *dev); · 917 unmodified lines | |||
| 918 | void acpi_subsys_complete(struct device *dev); | 918 | void acpi_subsys_complete(struct device *dev); |
| 919 | int acpi_subsys_suspend_late(struct device *dev); | 919 | int acpi_subsys_suspend_late(struct device *dev); |
| 920 | int acpi_subsys_suspend_noirq(struct device *dev); | 920 | int acpi_subsys_suspend_noirq(struct device *dev); |
| 921 | int acpi_subsys_resume_noirq(struct device *dev); | ||
| 922 | int acpi_subsys_resume_early(struct device *dev); | ||
| 923 | int acpi_subsys_suspend(struct device *dev); | 921 | int acpi_subsys_suspend(struct device *dev); |
| 924 | int acpi_subsys_freeze(struct device *dev); | 922 | int acpi_subsys_freeze(struct device *dev); |
| 925 | int acpi_subsys_freeze_late(struct device *dev); | ||
| 926 | int acpi_subsys_freeze_noirq(struct device *dev); | ||
| 927 | int acpi_subsys_thaw_noirq(struct device *dev); | ||
| 928 | #else | 923 | #else |
| 929 | static inline int acpi_dev_resume_early(struct device *dev) { return 0; } | 924 | static inline int acpi_dev_resume_early(struct device *dev) { return 0; } |
| 930 | static inline int acpi_subsys_prepare(struct device *dev) { return 0; } | 925 | static inline int acpi_subsys_prepare(struct device *dev) { return 0; } |
| 931 | static inline void acpi_subsys_complete(struct device *dev) {} | 926 | static inline void acpi_subsys_complete(struct device *dev) {} |
| 932 | static inline int acpi_subsys_suspend_late(struct device *dev) { return 0; } | 927 | static inline int acpi_subsys_suspend_late(struct device *dev) { return 0; } |
| 933 | static inline int acpi_subsys_suspend_noirq(struct device *dev) { return 0; } | 928 | static inline int acpi_subsys_suspend_noirq(struct device *dev) { return 0; } |
| 934 | static inline int acpi_subsys_resume_noirq(struct device *dev) { return 0; } | ||
| 935 | static inline int acpi_subsys_resume_early(struct device *dev) { return 0; } | ||
| 936 | static inline int acpi_subsys_suspend(struct device *dev) { return 0; } | 929 | static inline int acpi_subsys_suspend(struct device *dev) { return 0; } |
| 937 | static inline int acpi_subsys_freeze(struct device *dev) { return 0; } | 930 | static inline int acpi_subsys_freeze(struct device *dev) { return 0; } |
| 938 | static inline int acpi_subsys_freeze_late(struct device *dev) { return 0; } | ||
| 939 | static inline int acpi_subsys_freeze_noirq(struct device *dev) { return 0; } | ||
| 940 | static inline int acpi_subsys_thaw_noirq(struct device *dev) { return 0; } | ||
| 941 | #endif | 931 | #endif |
| 942 | 932 | ||
| 943 | #ifdef CONFIG_ACPI | 933 | #ifdef CONFIG_ACPI |