aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux
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/os/linux
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/os/linux')
-rw-r--r--module/os/linux/spl/spl-generic.c9
-rw-r--r--module/os/linux/zfs/zfs_ioctl_os.c10
2 files changed, 10 insertions, 9 deletions
diff --git a/module/os/linux/spl/spl-generic.c b/module/os/linux/spl/spl-generic.c
index 1deb2f444..01c8636e7 100644
--- a/module/os/linux/spl/spl-generic.c
+++ b/module/os/linux/spl/spl-generic.c
@@ -46,6 +46,7 @@
#include <sys/strings.h>
#include <linux/kmod.h>
#include "zfs_gitrev.h"
+#include <linux/mod_compat.h>
char spl_gitrev[64] = ZFS_META_GITREV;
@@ -751,7 +752,7 @@ spl_fini(void)
module_init(spl_init);
module_exit(spl_fini);
-MODULE_DESCRIPTION("Solaris Porting Layer");
-MODULE_AUTHOR(ZFS_META_AUTHOR);
-MODULE_LICENSE("GPL");
-MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);
+ZFS_MODULE_DESCRIPTION("Solaris Porting Layer");
+ZFS_MODULE_AUTHOR(ZFS_META_AUTHOR);
+ZFS_MODULE_LICENSE("GPL");
+ZFS_MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);
diff --git a/module/os/linux/zfs/zfs_ioctl_os.c b/module/os/linux/zfs/zfs_ioctl_os.c
index 4e672cca2..4e69eecf3 100644
--- a/module/os/linux/zfs/zfs_ioctl_os.c
+++ b/module/os/linux/zfs/zfs_ioctl_os.c
@@ -318,9 +318,9 @@ _fini(void)
#if defined(_KERNEL)
module_init(_init);
module_exit(_fini);
-
-MODULE_DESCRIPTION("ZFS");
-MODULE_AUTHOR(ZFS_META_AUTHOR);
-MODULE_LICENSE(ZFS_META_LICENSE);
-MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);
#endif
+
+ZFS_MODULE_DESCRIPTION("ZFS");
+ZFS_MODULE_AUTHOR(ZFS_META_AUTHOR);
+ZFS_MODULE_LICENSE(ZFS_META_LICENSE);
+ZFS_MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);