Commit 2329abfa344a9a824bc4c71f2415528777265510
1 parent
6d6a55ec08
Exists in
master
and in
6 other branches
module_param: make bool parameters really bool (core code)
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Showing 5 changed files with 9 additions and 8 deletions Side-by-side Diff
include/linux/init.h
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | #define _LINUX_INIT_H |
3 | 3 | |
4 | 4 | #include <linux/compiler.h> |
5 | +#include <linux/types.h> | |
5 | 6 | |
6 | 7 | /* These macros are used to mark some functions or |
7 | 8 | * initialized data (doesn't apply to uninitialized data) |
... | ... | @@ -156,7 +157,7 @@ |
156 | 157 | |
157 | 158 | extern void (*late_time_init)(void); |
158 | 159 | |
159 | -extern int initcall_debug; | |
160 | +extern bool initcall_debug; | |
160 | 161 | |
161 | 162 | #endif |
162 | 163 |
init/main.c
kernel/irq/internals.h
kernel/irq/spurious.c
kernel/printk.c
... | ... | @@ -521,7 +521,7 @@ |
521 | 521 | } |
522 | 522 | } |
523 | 523 | |
524 | -static int __read_mostly ignore_loglevel; | |
524 | +static bool __read_mostly ignore_loglevel; | |
525 | 525 | |
526 | 526 | static int __init ignore_loglevel_setup(char *str) |
527 | 527 | { |
528 | 528 | |
... | ... | @@ -696,9 +696,9 @@ |
696 | 696 | } |
697 | 697 | |
698 | 698 | #if defined(CONFIG_PRINTK_TIME) |
699 | -static int printk_time = 1; | |
699 | +static bool printk_time = 1; | |
700 | 700 | #else |
701 | -static int printk_time = 0; | |
701 | +static bool printk_time = 0; | |
702 | 702 | #endif |
703 | 703 | module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR); |
704 | 704 | |
... | ... | @@ -1098,7 +1098,7 @@ |
1098 | 1098 | return -1; |
1099 | 1099 | } |
1100 | 1100 | |
1101 | -int console_suspend_enabled = 1; | |
1101 | +bool console_suspend_enabled = 1; | |
1102 | 1102 | EXPORT_SYMBOL(console_suspend_enabled); |
1103 | 1103 | |
1104 | 1104 | static int __init console_suspend_disable(char *str) |