aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/moduleparam.h
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2013-11-08 13:56:38 -0500
committerPaul Moore <pmoore@redhat.com>2013-11-08 13:56:38 -0500
commit94851b18d4eb94f8bbf0d9176f7429bd8e371f62 (patch)
treec3c743ac6323e1caf9e987d6946cc4b2333a8256 /include/linux/moduleparam.h
parent42d64e1add3a1ce8a787116036163b8724362145 (diff)
parent5e01dc7b26d9f24f39abace5da98ccbd6a5ceb52 (diff)
Merge tag 'v3.12'
Linux 3.12
Diffstat (limited to 'include/linux/moduleparam.h')
-rw-r--r--include/linux/moduleparam.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index 27d9da3f86ff..c3eb102a9cc8 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -36,7 +36,18 @@ static const char __UNIQUE_ID(name)[] \
36 36
37struct kernel_param; 37struct kernel_param;
38 38
39/*
40 * Flags available for kernel_param_ops
41 *
42 * NOARG - the parameter allows for no argument (foo instead of foo=1)
43 */
44enum {
45 KERNEL_PARAM_FL_NOARG = (1 << 0)
46};
47
39struct kernel_param_ops { 48struct kernel_param_ops {
49 /* How the ops should behave */
50 unsigned int flags;
40 /* Returns 0, or -errno. arg is in kp->arg. */ 51 /* Returns 0, or -errno. arg is in kp->arg. */
41 int (*set)(const char *val, const struct kernel_param *kp); 52 int (*set)(const char *val, const struct kernel_param *kp);
42 /* Returns length written or -errno. Buffer is 4k (ie. be short!) */ 53 /* Returns length written or -errno. Buffer is 4k (ie. be short!) */
@@ -187,7 +198,7 @@ struct kparam_array
187/* Obsolete - use module_param_cb() */ 198/* Obsolete - use module_param_cb() */
188#define module_param_call(name, set, get, arg, perm) \ 199#define module_param_call(name, set, get, arg, perm) \
189 static struct kernel_param_ops __param_ops_##name = \ 200 static struct kernel_param_ops __param_ops_##name = \
190 { (void *)set, (void *)get }; \ 201 { 0, (void *)set, (void *)get }; \
191 __module_param_call(MODULE_PARAM_PREFIX, \ 202 __module_param_call(MODULE_PARAM_PREFIX, \
192 name, &__param_ops_##name, arg, \ 203 name, &__param_ops_##name, arg, \
193 (perm) + sizeof(__check_old_set_param(set))*0, -1) 204 (perm) + sizeof(__check_old_set_param(set))*0, -1)