diff options
Diffstat (limited to 'include/os/linux/kernel/linux/mod_compat.h')
-rw-r--r-- | include/os/linux/kernel/linux/mod_compat.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/os/linux/kernel/linux/mod_compat.h b/include/os/linux/kernel/linux/mod_compat.h index 1c48df5cbd81..e96e95313009 100644 --- a/include/os/linux/kernel/linux/mod_compat.h +++ b/include/os/linux/kernel/linux/mod_compat.h @@ -74,6 +74,7 @@ enum scope_prefix_types { zfs_vdev_cache, zfs_vdev_file, zfs_vdev_mirror, + zfs_vnops, zfs_zevent, zfs_zio, zfs_zil @@ -143,6 +144,17 @@ enum scope_prefix_types { MODULE_PARM_DESC(name_prefix ## name, desc) /* END CSTYLED */ +/* + * As above, but there is no variable with the name name_prefix ## name, + * so NULL is passed to module_param_call instead. + */ +/* BEGIN CSTYLED */ +#define ZFS_MODULE_VIRTUAL_PARAM_CALL(scope_prefix, name_prefix, name, setfunc, getfunc, perm, desc) \ + CTASSERT_GLOBAL((sizeof (scope_prefix) == sizeof (enum scope_prefix_types))); \ + module_param_call(name_prefix ## name, setfunc, getfunc, NULL, perm); \ + MODULE_PARM_DESC(name_prefix ## name, desc) +/* END CSTYLED */ + #define ZFS_MODULE_PARAM_ARGS const char *buf, zfs_kernel_param_t *kp #define ZFS_MODULE_DESCRIPTION(s) MODULE_DESCRIPTION(s) @@ -150,4 +162,6 @@ enum scope_prefix_types { #define ZFS_MODULE_LICENSE(s) MODULE_LICENSE(s) #define ZFS_MODULE_VERSION(s) MODULE_VERSION(s) +#define module_init_early(fn) module_init(fn) + #endif /* _MOD_COMPAT_H */ |