buffer: use the common initialization mechanism 33/156733/2
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Thu, 19 Oct 2017 17:43:34 +0000 (20:43 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 20 Oct 2017 11:02:42 +0000 (14:02 +0300)
Change-Id: I9322914ffa310cdd0ef354af4e4a586cd028c1e6
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
modules/buffer/swap_buffer_module.c

index 551f940b2e2498b105e8d33165ee3f562049af39..9696d747d6a86f9ba0971fa796e7588c37fd4601 100644 (file)
@@ -27,6 +27,7 @@
  * SWAP Buffer interface implementation.
  */
 
+#include <master/swap_initializer.h>
 #include "swap_buffer_module.h"
 #include "buffer_queue.h"
 #include "buffer_description.h"
@@ -343,21 +344,20 @@ int swap_buffer_callback(void *buffer, bool wakeup)
        return result;
 }
 
-static int __init swap_buffer_module_init(void)
+static int buffer_init(void)
 {
        printk(KERN_NOTICE "SWAP_BUFFER : Buffer module initialized\n");
        return E_SB_SUCCESS;
 }
 
-static void __exit swap_buffer_module_exit(void)
+static void buffer_uninit(void)
 {
        if (swap_buffer_status & BUFFER_ALLOC)
                swap_buffer_uninit();
        printk(KERN_NOTICE "SWAP_BUFFER : Buffer module unintialized\n");
 }
 
-module_init(swap_buffer_module_init);
-module_exit(swap_buffer_module_exit);
+SWAP_LIGHT_INIT_MODULE_CORE(buffer_init, buffer_uninit);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("SWAP buffer module");