diff options
Diffstat (limited to 'include/linux/moduleparam.h')
| -rw-r--r-- | include/linux/moduleparam.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 4a189dadb160..c83588c8d08b 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
| @@ -59,7 +59,7 @@ struct kparam_array | |||
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | /* This is the fundamental function for registering boot/module | 61 | /* This is the fundamental function for registering boot/module |
| 62 | parameters. perm sets the visibility in driverfs: 000 means it's | 62 | parameters. perm sets the visibility in sysfs: 000 means it's |
| 63 | not there, read bits mean it's readable, write bits mean it's | 63 | not there, read bits mean it's readable, write bits mean it's |
| 64 | writable. */ | 64 | writable. */ |
| 65 | #define __module_param_call(prefix, name, set, get, arg, perm) \ | 65 | #define __module_param_call(prefix, name, set, get, arg, perm) \ |
| @@ -169,10 +169,22 @@ extern int param_get_string(char *buffer, struct kernel_param *kp); | |||
| 169 | 169 | ||
| 170 | struct module; | 170 | struct module; |
| 171 | 171 | ||
| 172 | #if defined(CONFIG_SYSFS) && defined(CONFIG_MODULES) | ||
| 172 | extern int module_param_sysfs_setup(struct module *mod, | 173 | extern int module_param_sysfs_setup(struct module *mod, |
| 173 | struct kernel_param *kparam, | 174 | struct kernel_param *kparam, |
| 174 | unsigned int num_params); | 175 | unsigned int num_params); |
| 175 | 176 | ||
| 176 | extern void module_param_sysfs_remove(struct module *mod); | 177 | extern void module_param_sysfs_remove(struct module *mod); |
| 178 | #else | ||
| 179 | static inline int module_param_sysfs_setup(struct module *mod, | ||
| 180 | struct kernel_param *kparam, | ||
| 181 | unsigned int num_params) | ||
| 182 | { | ||
| 183 | return 0; | ||
| 184 | } | ||
| 185 | |||
| 186 | static inline void module_param_sysfs_remove(struct module *mod) | ||
| 187 | { } | ||
| 188 | #endif | ||
| 177 | 189 | ||
| 178 | #endif /* _LINUX_MODULE_PARAMS_H */ | 190 | #endif /* _LINUX_MODULE_PARAMS_H */ |
