summaryrefslogtreecommitdiff
path: root/include/linux/moduleparam.h
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2025-10-14 10:37:11 +0300
committerJani Nikula <jani.nikula@intel.com>2025-10-14 10:37:11 +0300
commit2acee98fcc61052d63fab4539fcb6ee677555645 (patch)
tree7809a2a2d02620d825a70123947246508bd90078 /include/linux/moduleparam.h
parenta051ef9f12f5b15857b54d6d68f1f525959c7ad9 (diff)
parent3a8660878839faadb4f1a6dd72c3179c1df56787 (diff)
downloadlinux-2acee98fcc61052d63fab4539fcb6ee677555645.tar.xz
Merge drm/drm-next into drm-intel-next
Sync to v6.18-rc1. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'include/linux/moduleparam.h')
-rw-r--r--include/linux/moduleparam.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index 3a25122d83e2..6907aedc4f74 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -349,6 +349,19 @@ static inline void kernel_param_unlock(struct module *mod)
__module_param_call("", name, &param_ops_##type, &var, perm, \
-1, KERNEL_PARAM_FL_UNSAFE)
+/**
+ * __core_param_cb - similar like core_param, with a set/get ops instead of type.
+ * @name: the name of the cmdline and sysfs parameter (often the same as var)
+ * @var: the variable
+ * @ops: the set & get operations for this parameter.
+ * @perm: visibility in sysfs
+ *
+ * Ideally this should be called 'core_param_cb', but the name has been
+ * used for module core parameter, so add the '__' prefix
+ */
+#define __core_param_cb(name, ops, arg, perm) \
+ __module_param_call("", name, ops, arg, perm, -1, 0)
+
#endif /* !MODULE */
/**