staging: lustre: remove cfs_module() macro
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2013 00:16:25 +0000 (08:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2013 00:16:25 +0000 (08:16 +0800)
Open code the module_init/module_exit lines, and also use
MODULE_VERSION, as it seems that was intended, but just never hooked up
at all.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
drivers/staging/lustre/lnet/lnet/module.c
drivers/staging/lustre/lnet/selftest/module.c
drivers/staging/lustre/lustre/fid/fid_request.c
drivers/staging/lustre/lustre/libcfs/module.c
drivers/staging/lustre/lustre/lov/lov_obd.c
drivers/staging/lustre/lustre/obdclass/class_obd.c
drivers/staging/lustre/lustre/obdecho/echo_client.c
drivers/staging/lustre/lustre/osc/osc_request.c
drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c

index 722d90c..64e75c7 100644 (file)
@@ -107,15 +107,6 @@ typedef struct task_struct       task_t;
        current->journal_info = journal_info;   \
        } while(0)
 
-/* Module interfaces */
-#define cfs_module(name, version, init, fini) \
-       module_init(init);                  \
-       module_exit(fini)
-
-/*
- * Signal
- */
-
 /*
  * Timer
  */
index d7b01e7..1f36763 100644 (file)
@@ -2898,5 +2898,7 @@ ksocknal_module_init (void)
 MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
 MODULE_DESCRIPTION("Kernel TCP Socket LND v3.0.0");
 MODULE_LICENSE("GPL");
+MODULE_VERSION("3.0.0");
 
-cfs_module(ksocknal, "3.0.0", ksocknal_module_init, ksocknal_module_fini);
+module_init(ksocknal_module_init);
+module_exit(ksocknal_module_fini);
index 8679b8d..afb8175 100644 (file)
@@ -149,5 +149,7 @@ fini_lnet(void)
 MODULE_AUTHOR("Peter J. Braam <braam@clusterfs.com>");
 MODULE_DESCRIPTION("Portals v3.1");
 MODULE_LICENSE("GPL");
+MODULE_VERSION("1.0.0");
 
-cfs_module(lnet, "1.0.0", init_lnet, fini_lnet);
+module_init(init_lnet);
+module_exit(fini_lnet);
index 5257e56..6dd4309 100644 (file)
@@ -165,5 +165,7 @@ error:
 
 MODULE_DESCRIPTION("LNet Selftest");
 MODULE_LICENSE("GPL");
+MODULE_VERSION("0.9.0");
 
-cfs_module(lnet, "0.9.0", lnet_selftest_init, lnet_selftest_fini);
+module_init(lnet_selftest_init);
+module_exit(lnet_selftest_fini);
index dc3948e..66007b5 100644 (file)
@@ -564,5 +564,7 @@ static void __exit fid_mod_exit(void)
 MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
 MODULE_DESCRIPTION("Lustre FID Module");
 MODULE_LICENSE("GPL");
+MODULE_VERSION("0.1.0");
 
-cfs_module(fid, "0.1.0", fid_mod_init, fid_mod_exit);
+module_init(fid_mod_init);
+module_exit(fid_mod_exit);
index 432b55d..f3108c7 100644 (file)
@@ -491,4 +491,6 @@ static void exit_libcfs_module(void)
        libcfs_arch_cleanup();
 }
 
-cfs_module(libcfs, "1.0.0", init_libcfs_module, exit_libcfs_module);
+MODULE_VERSION("1.0.0");
+module_init(init_libcfs_module);
+module_exit(exit_libcfs_module);
index a8c709e..71f5ef1 100644 (file)
@@ -2870,5 +2870,7 @@ static void /*__exit*/ lov_exit(void)
 MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
 MODULE_DESCRIPTION("Lustre Logical Object Volume OBD driver");
 MODULE_LICENSE("GPL");
+MODULE_VERSION(LUSTRE_VERSION_STRING);
 
-cfs_module(lov, LUSTRE_VERSION_STRING, lov_init, lov_exit);
+module_init(lov_init);
+module_exit(lov_exit);
index 44af412..b1024a6 100644 (file)
@@ -680,5 +680,7 @@ static void cleanup_obdclass(void)
 MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
 MODULE_DESCRIPTION("Lustre Class Driver Build Version: " BUILD_VERSION);
 MODULE_LICENSE("GPL");
+MODULE_VERSION(LUSTRE_VERSION_STRING);
 
-cfs_module(obdclass, LUSTRE_VERSION_STRING, init_obdclass, cleanup_obdclass);
+module_init(init_obdclass);
+module_exit(cleanup_obdclass);
index 25151b1..2644edf 100644 (file)
@@ -3163,7 +3163,9 @@ static void /*__exit*/ obdecho_exit(void)
 MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
 MODULE_DESCRIPTION("Lustre Testing Echo OBD driver");
 MODULE_LICENSE("GPL");
+MODULE_VERSION(LUSTRE_VERSION_STRING);
 
-cfs_module(obdecho, LUSTRE_VERSION_STRING, obdecho_init, obdecho_exit);
+module_init(obdecho_init);
+module_exit(obdecho_exit);
 
 /** @} echo_client */
index 611678c..ee6707a 100644 (file)
@@ -3656,5 +3656,7 @@ static void /*__exit*/ osc_exit(void)
 MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
 MODULE_DESCRIPTION("Lustre Object Storage Client (OSC)");
 MODULE_LICENSE("GPL");
+MODULE_VERSION(LUSTRE_VERSION_STRING);
 
-cfs_module(osc, LUSTRE_VERSION_STRING, osc_init, osc_exit);
+module_init(osc_init);
+module_exit(osc_exit);
index d26fce8..419e634 100644 (file)
@@ -149,5 +149,7 @@ static void __exit ptlrpc_exit(void)
 MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
 MODULE_DESCRIPTION("Lustre Request Processor and Lock Management");
 MODULE_LICENSE("GPL");
+MODULE_VERSION("1.0.0");
 
-cfs_module(ptlrpc, "1.0.0", ptlrpc_init, ptlrpc_exit);
+module_init(ptlrpc_init);
+module_exit(ptlrpc_exit);