compat: backport sdio power management API
[~emulex/for-vlad/old/compat.git] / compat / main.c
1 #include <linux/module.h>
2
3 MODULE_AUTHOR("Luis R. Rodriguez");
4 MODULE_DESCRIPTION("Kernel compatibility module");
5 MODULE_LICENSE("GPL");
6
7 #ifndef COMPAT_BASE_TREE
8 #error "You need a COMPAT_BASE_TREE"
9 #endif
10
11 #ifndef COMPAT_BASE_TREE_VERSION
12 #error "You need a COMPAT_BASE_TREE_VERSION"
13 #endif
14
15 #ifndef COMPAT_VERSION
16 #error "You need a COMPAT_VERSION"
17 #endif
18
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;
22
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");
26
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");
30
31 module_param(compat_version, charp, 0400);
32 MODULE_PARM_DESC(compat_version,
33                  "Version of the kernel compat backport work");
34
35 void compat_dependency_symbol(void)
36 {
37 }
38 EXPORT_SYMBOL_GPL(compat_dependency_symbol);
39
40
41 static int __init compat_init(void)
42 {
43         /* pm-qos for kernels <= 2.6.24, this is a no-op on newer kernels */
44         compat_pm_qos_power_init();
45         compat_system_workqueue_create();
46         init_compat_mmc_pm_flags();
47
48         printk(KERN_INFO
49                COMPAT_PROJECT " backport release: "
50                COMPAT_VERSION
51                "\n");
52         printk(KERN_INFO "Backport based on "
53                COMPAT_BASE_TREE " " COMPAT_BASE_TREE_VERSION
54                "\n");
55
56         return 0;
57 }
58 module_init(compat_init);
59
60 static void __exit compat_exit(void)
61 {
62         compat_pm_qos_power_deinit();
63         compat_system_workqueue_destroy();
64
65         return;
66 }
67 module_exit(compat_exit);
68