xref: /linux/samples/livepatch/livepatch-callbacks-mod.c (revision 24bce201d79807b668bf9d9e0aca801c5c0d5f78)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (C) 2017 Joe Lawrence <joe.lawrence@redhat.com>
4  */
5 
6 /*
7  * livepatch-callbacks-mod.c - (un)patching callbacks demo support module
8  *
9  *
10  * Purpose
11  * -------
12  *
13  * Simple module to demonstrate livepatch (un)patching callbacks.
14  *
15  *
16  * Usage
17  * -----
18  *
19  * This module is not intended to be standalone.  See the "Usage"
20  * section of livepatch-callbacks-demo.c.
21  */
22 
23 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
24 
25 #include <linux/module.h>
26 #include <linux/kernel.h>
27 
28 static int livepatch_callbacks_mod_init(void)
29 {
30 	pr_info("%s\n", __func__);
31 	return 0;
32 }
33 
34 static void livepatch_callbacks_mod_exit(void)
35 {
36 	pr_info("%s\n", __func__);
37 }
38 
39 module_init(livepatch_callbacks_mod_init);
40 module_exit(livepatch_callbacks_mod_exit);
41 MODULE_LICENSE("GPL");
42