summaryrefslogtreecommitdiff
path: root/kernel/module.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2002-12-14 20:13:17 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2002-12-14 20:13:17 -0800
commit9abc5156ce4c55443e9f6176063af2c4fa90c793 (patch)
tree5900b712c60af8344166c0c3cd4bfb63f11dc2f5 /kernel/module.c
parent326e7842d30d5cfc1089b85a7aa63e5c9f3c0a74 (diff)
[PATCH] Parameter implementation for modules
This activates parameter parsing for module_param() declarations in modules.
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 53f4467acd3c..ac0c424fce0b 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -26,6 +26,7 @@
#include <linux/fcntl.h>
#include <linux/rcupdate.h>
#include <linux/cpu.h>
+#include <linux/moduleparam.h>
#include <asm/uaccess.h>
#include <asm/semaphore.h>
#include <asm/pgalloc.h>
@@ -900,7 +901,7 @@ static struct module *load_module(void *umod,
/* Strings */
DEBUGP("String table found in section %u\n", i);
strindex = i;
- } else if (strcmp(secstrings+sechdrs[i].sh_name, ".setup.init")
+ } else if (strcmp(secstrings+sechdrs[i].sh_name, "__param")
== 0) {
/* Setup parameter info */
DEBUGP("Setup table found in section %u\n", i);
@@ -1048,8 +1049,7 @@ static struct module *load_module(void *umod,
if (err < 0)
goto cleanup;
-#if 0 /* Needs param support */
- /* Size of section 0 is 0, so this works well */
+ /* Size of section 0 is 0, so this works well if no params */
err = parse_args(mod->args,
(struct kernel_param *)
sechdrs[setupindex].sh_offset,
@@ -1058,7 +1058,6 @@ static struct module *load_module(void *umod,
NULL);
if (err < 0)
goto cleanup;
-#endif
/* Get rid of temporary copy */
vfree(hdr);