hc
2023-11-22 f743a7adbd6e230d66a6206fa115b59fec2d88eb
kernel/kernel/power/hibernate.c
....@@ -690,6 +690,10 @@
690690 return error;
691691 }
692692
693
+#ifndef CONFIG_SUSPEND
694
+bool pm_in_action;
695
+#endif
696
+
693697 /**
694698 * hibernate - Carry out system hibernation, including saving the image.
695699 */
....@@ -702,6 +706,8 @@
702706 pm_pr_dbg("Hibernation not available.\n");
703707 return -EPERM;
704708 }
709
+
710
+ pm_in_action = true;
705711
706712 lock_system_sleep();
707713 /* The snapshot device should not be opened while we're running */
....@@ -781,6 +787,7 @@
781787 atomic_inc(&snapshot_device_available);
782788 Unlock:
783789 unlock_system_sleep();
790
+ pm_in_action = false;
784791 pr_info("hibernation exit\n");
785792
786793 return error;