18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (C) 2017 Joe Lawrence <joe.lawrence@redhat.com> 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci/* 78c2ecf20Sopenharmony_ci * livepatch-callbacks-mod.c - (un)patching callbacks demo support module 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * Purpose 118c2ecf20Sopenharmony_ci * ------- 128c2ecf20Sopenharmony_ci * 138c2ecf20Sopenharmony_ci * Simple module to demonstrate livepatch (un)patching callbacks. 148c2ecf20Sopenharmony_ci * 158c2ecf20Sopenharmony_ci * 168c2ecf20Sopenharmony_ci * Usage 178c2ecf20Sopenharmony_ci * ----- 188c2ecf20Sopenharmony_ci * 198c2ecf20Sopenharmony_ci * This module is not intended to be standalone. See the "Usage" 208c2ecf20Sopenharmony_ci * section of livepatch-callbacks-demo.c. 218c2ecf20Sopenharmony_ci */ 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#include <linux/module.h> 268c2ecf20Sopenharmony_ci#include <linux/kernel.h> 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_cistatic int livepatch_callbacks_mod_init(void) 298c2ecf20Sopenharmony_ci{ 308c2ecf20Sopenharmony_ci pr_info("%s\n", __func__); 318c2ecf20Sopenharmony_ci return 0; 328c2ecf20Sopenharmony_ci} 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_cistatic void livepatch_callbacks_mod_exit(void) 358c2ecf20Sopenharmony_ci{ 368c2ecf20Sopenharmony_ci pr_info("%s\n", __func__); 378c2ecf20Sopenharmony_ci} 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_cimodule_init(livepatch_callbacks_mod_init); 408c2ecf20Sopenharmony_cimodule_exit(livepatch_callbacks_mod_exit); 418c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL"); 42