MCPcopy Create free account
hub / github.com/Bareflank/hypervisor / dev_pm

Function dev_pm

loader/linux/src/entry.c:205–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205int
206dev_pm(struct notifier_block *nb, unsigned long code, void *unused)
207{
208 int ret;
209
210 switch (code) {
211 case PM_SUSPEND_PREPARE:
212 case PM_HIBERNATION_PREPARE:
213 case PM_RESTORE_PREPARE: {
214 ret = suspend();
215 break;
216 }
217
218 case PM_POST_SUSPEND:
219 case PM_POST_HIBERNATION:
220 case PM_POST_RESTORE: {
221 ret = resume();
222 break;
223 }
224
225 default: {
226 ret = NOTIFY_DONE;
227 break;
228 }
229 }
230
231 return ret;
232}
233
234static struct notifier_block reboot_notifier_block = {
235 .notifier_call = dev_reboot};

Callers

nothing calls this directly

Calls 2

suspendFunction · 0.85
resumeFunction · 0.85

Tested by

no test coverage detected