[Patch] printk: move some loglevel setup functions to kernel/printk.c
From: Amerigo Wang
Date:  Wed Jan 19 2011 - 02:31:18 EST
These parameter setup functions should go to kernel/printk.c,
and should also be under CONFIG_PRINTK.
Signed-off-by: WANG Cong <amwang@xxxxxxxxxx>
---
diff --git a/init/main.c b/init/main.c
index 00799c1..b832b69 100644
--- a/init/main.c
+++ b/init/main.c
@@ -240,29 +240,6 @@ unsigned long loops_per_jiffy = (1<<12);
 
 EXPORT_SYMBOL(loops_per_jiffy);
 
-static int __init debug_kernel(char *str)
-{
-	console_loglevel = 10;
-	return 0;
-}
-
-static int __init quiet_kernel(char *str)
-{
-	console_loglevel = 4;
-	return 0;
-}
-
-early_param("debug", debug_kernel);
-early_param("quiet", quiet_kernel);
-
-static int __init loglevel(char *str)
-{
-	get_option(&str, &console_loglevel);
-	return 0;
-}
-
-early_param("loglevel", loglevel);
-
 /*
  * Unknown boot options get handed to init, unless they look like
  * unused parameters (modprobe will find them in /proc/cmdline).
diff --git a/kernel/printk.c b/kernel/printk.c
index 53d9a9e..e495a2c 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -467,6 +467,30 @@ static void __call_console_drivers(unsigned start, unsigned end)
 	}
 }
 
+static int __init debug_kernel(char *str)
+{
+	console_loglevel = 10;
+	return 0;
+}
+
+early_param("debug", debug_kernel);
+
+static int __init quiet_kernel(char *str)
+{
+	console_loglevel = 4;
+	return 0;
+}
+
+early_param("quiet", quiet_kernel);
+
+static int __init loglevel(char *str)
+{
+	get_option(&str, &console_loglevel);
+	return 0;
+}
+
+early_param("loglevel", loglevel);
+
 static int __read_mostly ignore_loglevel;
 
 static int __init ignore_loglevel_setup(char *str)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/