import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / lib / lz4k / lz4k_init.c
1 #include <linux/version.h>
2 #include <linux/module.h>
3 #include <linux/kernel.h>
4
5 int lz4k_compress(const unsigned char *src, size_t src_len,
6 unsigned char *dst, size_t *dst_len, void *wrkmem);
7 int lz4k_decompress_safe(const unsigned char *src, size_t src_len,
8 unsigned char *dst, size_t *dst_len);
9
10 /* Set ZRAM hooks */
11 extern void zram_set_hooks(void *compress_func, void *decompress_func, const char *name);
12 static int __init lz4k_init(void)
13 {
14 zram_set_hooks(&lz4k_compress, &lz4k_decompress_safe, "LZ4K");
15 return 0;
16 }
17
18 static void __exit lz4k_exit(void)
19 {
20 printk(KERN_INFO "Bye LZ4K!\n");
21 }
22 module_init(lz4k_init);
23 module_exit(lz4k_exit);