• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (c) Wipro Technologies Ltd, 2002.  All Rights Reserved.
4  * Copyright (c) 2018 Xiao Yang <yangx.jy@cn.fujitsu.com>
5  */
6 /*
7  * Description:
8  * This is a kernel loadable module programme used by delete_module03
9  * testcase which inserts this module as part of setup. This module
10  * has dependency on dummy_del_mod module (calls function of dummy_del_mod
11  * during initialization).
12  */
13 
14 #include <linux/module.h>
15 #include <linux/init.h>
16 #include <linux/proc_fs.h>
17 #include <linux/kernel.h>
18 
19 extern int dummy_func_test(void);
20 
dummy_init(void)21 static int __init dummy_init(void)
22 {
23 	struct proc_dir_entry *proc_dummy;
24 
25 	proc_dummy = proc_mkdir("dummy_dep", 0);
26 	dummy_func_test();
27 	return 0;
28 }
29 
dummy_exit(void)30 static void __exit dummy_exit(void)
31 {
32 	remove_proc_entry("dummy_dep", 0);
33 }
34 
35 module_init(dummy_init);
36 module_exit(dummy_exit);
37 MODULE_LICENSE("GPL");
38