aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-01-12 19:59:43 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 11:03:09 -0500
commita9747cc3addf81e56ea9b8a4374fbdb9d1737eae (patch)
treefe163341b5c80ea2f597095c609eec959ee3e728 /include
parentfb842b00c5eab66ec361b31550aa8a922745ce9e (diff)
include/linux/printk.h: move console functions and variables together
There are many uses of printk_once(KERN_<level>, so add pr_<level>_once macros to avoid printk_once(KERN_<level> pr_fmt(fmt). Add an #ifdef CONFIG_PRINTK for print_hex_dump and static inline void functions for the #else cases to reduce embedded code size. Neaten and organize the rest of the code. This patch: Move console functions and variables together. Signed-off-by: Joe Perches <joe@perches.com> Cc: Matt Mackall <mpm@selenic.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/printk.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 9adfba6ec28a..bd43c727c0a0 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -29,6 +29,17 @@ extern int console_printk[];
29#define minimum_console_loglevel (console_printk[2]) 29#define minimum_console_loglevel (console_printk[2])
30#define default_console_loglevel (console_printk[3]) 30#define default_console_loglevel (console_printk[3])
31 31
32static inline void console_silent(void)
33{
34 console_loglevel = 0;
35}
36
37static inline void console_verbose(void)
38{
39 if (console_loglevel)
40 console_loglevel = 15;
41}
42
32struct va_format { 43struct va_format {
33 const char *fmt; 44 const char *fmt;
34 va_list *va; 45 va_list *va;
@@ -131,17 +142,6 @@ extern void printk_tick(void);
131extern void asmlinkage __attribute__((format(printf, 1, 2))) 142extern void asmlinkage __attribute__((format(printf, 1, 2)))
132 early_printk(const char *fmt, ...); 143 early_printk(const char *fmt, ...);
133 144
134static inline void console_silent(void)
135{
136 console_loglevel = 0;
137}
138
139static inline void console_verbose(void)
140{
141 if (console_loglevel)
142 console_loglevel = 15;
143}
144
145extern void dump_stack(void) __cold; 145extern void dump_stack(void) __cold;
146 146
147enum { 147enum {