[REFACTOR] move probes_manager_/init/down()
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Wed, 24 Apr 2013 15:51:33 +0000 (19:51 +0400)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Wed, 24 Apr 2013 15:51:33 +0000 (19:51 +0400)
from src/modules/driver/probes_manager.c
to src/modules/driver/module.c

driver/module.c
driver/probes_manager.c
driver/probes_manager.h

index 9261bcc..e697269 100644 (file)
@@ -63,6 +63,27 @@ void __put_task_struct(struct task_struct *tsk)
 void (*flush_cache_page) (struct vm_area_struct * vma, unsigned long page);
 #endif
 
+static int probes_manager_init(void)
+{
+       int ret;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
+       spin_lock_init(&ec_spinlock);
+#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38) */
+
+       ret = init_helper();
+       if (ret)
+               return ret;
+
+       return storage_init();
+}
+
+static void probes_manager_down(void)
+{
+       unset_kernel_probes();
+       uninit_helper();
+       storage_down();
+}
+
 static int __init InitializeModule(void)
 {
        if(device_name == NULL) {
index ce7c625..02310dd 100644 (file)
 /* list of selected non-predefined kernel probes */
 static HLIST_HEAD(kernel_probes);
 
-int
-probes_manager_init (void)
-{
-       int ret;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
-       spin_lock_init(&ec_spinlock);
-#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38) */
-
-       ret = init_helper();
-       if (ret)
-               return ret;
-
-       return storage_init ();
-}
-
-void
-probes_manager_down (void)
-{
-       unset_kernel_probes();
-       uninit_helper();
-       storage_down ();
-}
-
 static int register_kernel_probe(kernel_probe_t *p)
 {
        int ret;
index 8b32f45..15ef0a8 100644 (file)
@@ -28,9 +28,6 @@ typedef struct
        struct hlist_node hlist;
 } kernel_probe_t;
 
-extern int probes_manager_init (void);
-extern void probes_manager_down (void);
-
 extern int add_probe (unsigned long addr);
 extern int reset_probes(void);