rdma.m4: check if debugfs_create_bool() uses a bool or u32 pointer
[~tnikolova/compat/.git] / compat / main.c
1 #include <linux/module.h>
2
3 MODULE_AUTHOR("Luis R. Rodriguez");
4 MODULE_DESCRIPTION("Kernel backport module");
5 MODULE_LICENSE("GPL");
6
7 #ifndef COMPAT_BASE
8 #error "You need a COMPAT_BASE"
9 #endif
10
11 #ifndef COMPAT_BASE_TREE
12 #error "You need a COMPAT_BASE_TREE"
13 #endif
14
15 #ifndef COMPAT_BASE_TREE_VERSION
16 #error "You need a COMPAT_BASE_TREE_VERSION"
17 #endif
18
19 #ifndef COMPAT_VERSION
20 #error "You need a COMPAT_VERSION"
21 #endif
22
23 static char *compat_base = COMPAT_BASE;
24 static char *compat_base_tree = COMPAT_BASE_TREE;
25 static char *compat_base_tree_version = COMPAT_BASE_TREE_VERSION;
26 static char *compat_version = COMPAT_VERSION;
27
28 module_param(compat_base, charp, 0400);
29 MODULE_PARM_DESC(compat_base_tree,
30                  "The upstream verion of compat.git used");
31
32 module_param(compat_base_tree, charp, 0400);
33 MODULE_PARM_DESC(compat_base_tree,
34                  "The upstream tree used as base for this backport");
35
36 module_param(compat_base_tree_version, charp, 0400);
37 MODULE_PARM_DESC(compat_base_tree_version,
38                  "The git-describe of the upstream base tree");
39
40 module_param(compat_version, charp, 0400);
41 MODULE_PARM_DESC(compat_version,
42                  "Version of the kernel compat backport work");
43
44 void backport_dependency_symbol(void)
45 {
46 }
47 EXPORT_SYMBOL_GPL(backport_dependency_symbol);
48
49
50 static int __init backport_init(void)
51 {
52         int err;
53
54         err = backport_system_workqueue_create();
55         if (err) {
56                 pr_warn("backport_system_workqueue_create() failed\n");
57                 return err;
58         }
59
60         printk(KERN_INFO
61                COMPAT_PROJECT " backport release: "
62                COMPAT_VERSION
63                "\n");
64         printk(KERN_INFO "Backport based on "
65                COMPAT_BASE_TREE " " COMPAT_BASE_TREE_VERSION
66                "\n");
67         printk(KERN_INFO "compat.git: "
68                COMPAT_BASE_TREE "\n");
69
70         return 0;
71 }
72 module_init(backport_init);
73
74 static void __exit backport_exit(void)
75 {
76         backport_system_workqueue_destroy();
77
78         return;
79 }
80 module_exit(backport_exit);
81