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

Function dev_init

loader/linux/src/entry.c:239–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237static struct notifier_block pm_notifier_block = {.notifier_call = dev_pm};
238
239int
240dev_init(void)
241{
242 register_reboot_notifier(&reboot_notifier_block);
243 register_pm_notifier(&pm_notifier_block);
244
245 serial_init();
246
247 if (loader_init()) {
248 bferror("loader_init failed");
249 goto loader_init_failed;
250 }
251
252 if (misc_register(&bareflank_dev)) {
253 bferror("misc_register failed");
254 goto misc_register_failed;
255 }
256
257 return 0;
258
259 misc_deregister(&bareflank_dev);
260misc_register_failed:
261
262 loader_fini();
263loader_init_failed:
264
265 unregister_pm_notifier(&pm_notifier_block);
266 unregister_reboot_notifier(&reboot_notifier_block);
267
268 return -EPERM;
269}
270
271void
272dev_exit(void)

Callers

nothing calls this directly

Calls 4

loader_initFunction · 0.85
loader_finiFunction · 0.85
serial_initFunction · 0.50
bferrorFunction · 0.50

Tested by

no test coverage detected