xref: /openbmc/linux/samples/livepatch/livepatch-callbacks-mod.c (revision 58e16d792a6a8c6b750f637a4649967fcac853dc)
1*1ccea77eSThomas Gleixner // SPDX-License-Identifier: GPL-2.0-or-later
293862e38SJoe Lawrence /*
393862e38SJoe Lawrence  * Copyright (C) 2017 Joe Lawrence <joe.lawrence@redhat.com>
493862e38SJoe Lawrence  */
593862e38SJoe Lawrence 
693862e38SJoe Lawrence /*
793862e38SJoe Lawrence  * livepatch-callbacks-mod.c - (un)patching callbacks demo support module
893862e38SJoe Lawrence  *
993862e38SJoe Lawrence  *
1093862e38SJoe Lawrence  * Purpose
1193862e38SJoe Lawrence  * -------
1293862e38SJoe Lawrence  *
1393862e38SJoe Lawrence  * Simple module to demonstrate livepatch (un)patching callbacks.
1493862e38SJoe Lawrence  *
1593862e38SJoe Lawrence  *
1693862e38SJoe Lawrence  * Usage
1793862e38SJoe Lawrence  * -----
1893862e38SJoe Lawrence  *
1993862e38SJoe Lawrence  * This module is not intended to be standalone.  See the "Usage"
2093862e38SJoe Lawrence  * section of livepatch-callbacks-demo.c.
2193862e38SJoe Lawrence  */
2293862e38SJoe Lawrence 
2393862e38SJoe Lawrence #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
2493862e38SJoe Lawrence 
2593862e38SJoe Lawrence #include <linux/module.h>
2693862e38SJoe Lawrence #include <linux/kernel.h>
2793862e38SJoe Lawrence 
livepatch_callbacks_mod_init(void)2893862e38SJoe Lawrence static int livepatch_callbacks_mod_init(void)
2993862e38SJoe Lawrence {
3093862e38SJoe Lawrence 	pr_info("%s\n", __func__);
3193862e38SJoe Lawrence 	return 0;
3293862e38SJoe Lawrence }
3393862e38SJoe Lawrence 
livepatch_callbacks_mod_exit(void)3493862e38SJoe Lawrence static void livepatch_callbacks_mod_exit(void)
3593862e38SJoe Lawrence {
3693862e38SJoe Lawrence 	pr_info("%s\n", __func__);
3793862e38SJoe Lawrence }
3893862e38SJoe Lawrence 
3993862e38SJoe Lawrence module_init(livepatch_callbacks_mod_init);
4093862e38SJoe Lawrence module_exit(livepatch_callbacks_mod_exit);
4193862e38SJoe Lawrence MODULE_LICENSE("GPL");
42