1 #include <linux/module.h>
3 MODULE_AUTHOR("Luis R. Rodriguez");
4 MODULE_DESCRIPTION("Kernel compatibility module");
7 #ifndef COMPAT_BASE_TREE
8 #error "You need a COMPAT_BASE_TREE"
11 #ifndef COMPAT_BASE_TREE_VERSION
12 #error "You need a COMPAT_BASE_TREE_VERSION"
15 #ifndef COMPAT_VERSION
16 #error "You need a COMPAT_VERSION"
19 static char *compat_base_tree = COMPAT_BASE_TREE;
20 static char *compat_base_tree_version = COMPAT_BASE_TREE_VERSION;
21 static char *compat_version = COMPAT_VERSION;
23 module_param(compat_base_tree, charp, 0400);
24 MODULE_PARM_DESC(compat_base_tree,
25 "The upstream tree used as base for this backport");
27 module_param(compat_base_tree_version, charp, 0400);
28 MODULE_PARM_DESC(compat_base_tree_version,
29 "The git-describe of the upstream base tree");
31 module_param(compat_version, charp, 0400);
32 MODULE_PARM_DESC(compat_version,
33 "Version of the kernel compat backport work");
35 void compat_dependency_symbol(void)
38 EXPORT_SYMBOL_GPL(compat_dependency_symbol);
40 static int __init compat_init(void)
42 /* pm-qos for kernels <= 2.6.24, this is a no-op on newer kernels */
43 compat_pm_qos_power_init();
44 compat_system_workqueue_create();
47 COMPAT_PROJECT " backport release: "
50 printk(KERN_INFO "Backport based on "
51 COMPAT_BASE_TREE " " COMPAT_BASE_TREE_VERSION
56 module_init(compat_init);
58 static void __exit compat_exit(void)
60 compat_pm_qos_power_deinit();
61 compat_system_workqueue_destroy();
65 module_exit(compat_exit);