Subject: remove CONFIG_KMOD from core kernel code
Date: Tue, 08 Jul 2008 19:00:17 +0200
From: Johannes Berg <johannes@sipsolutions.net>

Always compile request_module when the kernel allows modules.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
 include/linux/kmod.h |    2 +-
 kernel/exec_domain.c |    2 +-
 kernel/kmod.c        |    2 +-
 kernel/sysctl.c      |    4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff -r 41ccab1deff2 include/linux/kmod.h
--- a/include/linux/kmod.h	Tue Jul 15 12:47:14 2008 +1000
+++ b/include/linux/kmod.h	Tue Jul 15 12:49:09 2008 +1000
@@ -25,7 +25,7 @@
 
 #define KMOD_PATH_LEN 256
 
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
 /* modprobe exit status on success, -ve on error.  Return value
  * usually useless though. */
 extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2)));
diff -r 41ccab1deff2 kernel/exec_domain.c
--- a/kernel/exec_domain.c	Tue Jul 15 12:47:14 2008 +1000
+++ b/kernel/exec_domain.c	Tue Jul 15 12:49:09 2008 +1000
@@ -65,7 +65,7 @@ lookup_exec_domain(u_long personality)
 				goto out;
 	}
 
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
 	read_unlock(&exec_domains_lock);
 	request_module("personality-%ld", pers);
 	read_lock(&exec_domains_lock);
diff -r 41ccab1deff2 kernel/kmod.c
--- a/kernel/kmod.c	Tue Jul 15 12:47:14 2008 +1000
+++ b/kernel/kmod.c	Tue Jul 15 12:49:09 2008 +1000
@@ -42,7 +42,7 @@ extern int max_threads;
 
 static struct workqueue_struct *khelper_wq;
 
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
 
 /*
 	modprobe_path is set via /proc/sys.
diff -r 41ccab1deff2 kernel/sysctl.c
--- a/kernel/sysctl.c	Tue Jul 15 12:47:14 2008 +1000
+++ b/kernel/sysctl.c	Tue Jul 15 12:49:09 2008 +1000
@@ -107,7 +107,7 @@ static int min_percpu_pagelist_fract = 8
 
 static int ngroups_max = NGROUPS_MAX;
 
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
 extern char modprobe_path[];
 #endif
 #ifdef CONFIG_CHR_DEV_SG
@@ -472,7 +472,7 @@ static struct ctl_table kern_table[] = {
 		.proc_handler	= &ftrace_enable_sysctl,
 	},
 #endif
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
 	{
 		.ctl_name	= KERN_MODPROBE,
 		.procname	= "modprobe",
