aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/moduleparam.h
diff options
context:
space:
mode:
authorAnton Vorontsov <cbouatmailru@gmail.com>2012-01-04 00:09:35 -0500
committerAnton Vorontsov <cbouatmailru@gmail.com>2012-01-04 00:09:35 -0500
commit251f39fe42dae863bd24e30864e6b66076ba076d (patch)
treec804944bc17f3836d19cc8b5bc611dd1fb0ea915 /include/linux/moduleparam.h
parent9b8872273af6983b246252a6508fa7cf34c69d6e (diff)
parent35b4c01e29bdd9632dabf9784ed3486333f00427 (diff)
Merge branch 'power-supply-scope' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
Diffstat (limited to 'include/linux/moduleparam.h')
-rw-r--r--include/linux/moduleparam.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index ddaae98c53f9..7939f636c8ba 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -31,6 +31,11 @@ static const char __module_cat(name,__LINE__)[] \
31#define __MODULE_PARM_TYPE(name, _type) \ 31#define __MODULE_PARM_TYPE(name, _type) \
32 __MODULE_INFO(parmtype, name##type, #name ":" _type) 32 __MODULE_INFO(parmtype, name##type, #name ":" _type)
33 33
34/* One for each parameter, describing how to use it. Some files do
35 multiple of these per line, so can't just use MODULE_INFO. */
36#define MODULE_PARM_DESC(_parm, desc) \
37 __MODULE_INFO(parm, _parm, #_parm ":" desc)
38
34struct kernel_param; 39struct kernel_param;
35 40
36struct kernel_param_ops { 41struct kernel_param_ops {
@@ -262,6 +267,26 @@ static inline void __kernel_param_unlock(void)
262 .str = &__param_string_##name, 0, perm); \ 267 .str = &__param_string_##name, 0, perm); \
263 __MODULE_PARM_TYPE(name, "string") 268 __MODULE_PARM_TYPE(name, "string")
264 269
270/**
271 * parameq - checks if two parameter names match
272 * @name1: parameter name 1
273 * @name2: parameter name 2
274 *
275 * Returns true if the two parameter names are equal.
276 * Dashes (-) are considered equal to underscores (_).
277 */
278extern bool parameq(const char *name1, const char *name2);
279
280/**
281 * parameqn - checks if two parameter names match
282 * @name1: parameter name 1
283 * @name2: parameter name 2
284 * @n: the length to compare
285 *
286 * Similar to parameq(), except it compares @n characters.
287 */
288extern bool parameqn(const char *name1, const char *name2, size_t n);
289
265/* Called on module insert or kernel boot */ 290/* Called on module insert or kernel boot */
266extern int parse_args(const char *name, 291extern int parse_args(const char *name,
267 char *args, 292 char *args,