aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Young <hidave.darkstar@gmail.com>2010-03-10 15:24:06 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 15:53:10 -0800
commit5ed109103d73b0bafc92e860cead56725231384d (patch)
tree4744e2d3c0e11095865e22ff285f71b7fb542f3d
parente5ab67726f33b50f40db0ccf271ceb3c658554d5 (diff)
sysctl extern cleanup: module
Extern declarations in sysctl.c should be moved to their own header file, and then include them in relavant .c files. Move modprobe_path extern declaration to linux/kmod.h Move modules_disabled extern declaration to linux/module.h Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/kmod.h1
-rw-r--r--include/linux/module.h1
-rw-r--r--kernel/sysctl.c4
3 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index 384ca8bbf1a..facb27fe7de 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -27,6 +27,7 @@
#define KMOD_PATH_LEN 256
#ifdef CONFIG_MODULES
+extern char modprobe_path[]; /* for sysctl */
/* modprobe exit status on success, -ve on error. Return value
* usually useless though. */
extern int __request_module(bool wait, const char *name, ...) \
diff --git a/include/linux/module.h b/include/linux/module.h
index dd618eb026a..5e869ffd34a 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -175,6 +175,7 @@ struct notifier_block;
#ifdef CONFIG_MODULES
+extern int modules_disabled; /* for sysctl */
/* Get/put a kernel symbol (calls must be symmetric) */
void *__symbol_get(const char *symbol);
void *__symbol_get_gpl(const char *symbol);
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index f18aaa7b0d6..44e9492368f 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -116,10 +116,6 @@ static int min_percpu_pagelist_fract = 8;
static int ngroups_max = NGROUPS_MAX;
-#ifdef CONFIG_MODULES
-extern char modprobe_path[];
-extern int modules_disabled;
-#endif
#ifdef CONFIG_CHR_DEV_SG
extern int sg_big_buff;
#endif