aboutsummaryrefslogtreecommitdiffstats
path: root/module/avl
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-11-01 10:41:03 -0700
committerBrian Behlendorf <[email protected]>2019-11-01 10:41:03 -0700
commit4a2ed9001353a895ff84594cb34e9c42fd24edaa (patch)
tree5b491b0d933db97f8d33cd6a02b2f18fed0d5d21 /module/avl
parentbd4dde8ef7b3861b20f12619f8994e037b303040 (diff)
Wrap Linux module macros
MODULE_VERSION is already defined on FreeBSD. Wrap all of the used MODULE_* macros for the sake of consistency and portability. Add a user space noop version to reduce the need for _KERNEL ifdefs. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9542
Diffstat (limited to 'module/avl')
-rw-r--r--module/avl/avl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/module/avl/avl.c b/module/avl/avl.c
index 1d2843f0e..6d8fca214 100644
--- a/module/avl/avl.c
+++ b/module/avl/avl.c
@@ -103,6 +103,7 @@
#include <sys/debug.h>
#include <sys/avl.h>
#include <sys/cmn_err.h>
+#include <sys/mod.h>
/*
* Small arrays to translate between balance (or diff) values and child indices.
@@ -993,7 +994,6 @@ done:
}
#if defined(_KERNEL)
-#include <linux/module.h>
static int __init
avl_init(void)
@@ -1008,11 +1008,12 @@ avl_fini(void)
module_init(avl_init);
module_exit(avl_fini);
+#endif
-MODULE_DESCRIPTION("Generic AVL tree implementation");
-MODULE_AUTHOR(ZFS_META_AUTHOR);
-MODULE_LICENSE(ZFS_META_LICENSE);
-MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);
+ZFS_MODULE_DESCRIPTION("Generic AVL tree implementation");
+ZFS_MODULE_AUTHOR(ZFS_META_AUTHOR);
+ZFS_MODULE_LICENSE(ZFS_META_LICENSE);
+ZFS_MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);
EXPORT_SYMBOL(avl_create);
EXPORT_SYMBOL(avl_find);
@@ -1029,4 +1030,3 @@ EXPORT_SYMBOL(avl_remove);
EXPORT_SYMBOL(avl_numnodes);
EXPORT_SYMBOL(avl_destroy_nodes);
EXPORT_SYMBOL(avl_destroy);
-#endif