diff options
Diffstat (limited to 'include/linux/dynamic_debug.h')
-rw-r--r-- | include/linux/dynamic_debug.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index bf1b0fcc3c65..4697e4b59d6f 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
@@ -44,6 +44,9 @@ extern int ddebug_remove_module(const char *mod_name); | |||
44 | extern __printf(2, 3) | 44 | extern __printf(2, 3) |
45 | int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...); | 45 | int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...); |
46 | 46 | ||
47 | extern int ddebug_dyndbg_module_param_cb(char *param, char *val, | ||
48 | const char *modname); | ||
49 | |||
47 | struct device; | 50 | struct device; |
48 | 51 | ||
49 | extern __printf(3, 4) | 52 | extern __printf(3, 4) |
@@ -94,11 +97,25 @@ do { \ | |||
94 | 97 | ||
95 | #else | 98 | #else |
96 | 99 | ||
100 | #include <linux/string.h> | ||
101 | #include <linux/errno.h> | ||
102 | |||
97 | static inline int ddebug_remove_module(const char *mod) | 103 | static inline int ddebug_remove_module(const char *mod) |
98 | { | 104 | { |
99 | return 0; | 105 | return 0; |
100 | } | 106 | } |
101 | 107 | ||
108 | static inline int ddebug_dyndbg_module_param_cb(char *param, char *val, | ||
109 | const char *modname) | ||
110 | { | ||
111 | if (strstr(param, "dyndbg")) { | ||
112 | pr_warn("dyndbg supported only in " | ||
113 | "CONFIG_DYNAMIC_DEBUG builds\n"); | ||
114 | return 0; /* allow and ignore */ | ||
115 | } | ||
116 | return -EINVAL; | ||
117 | } | ||
118 | |||
102 | #define dynamic_pr_debug(fmt, ...) \ | 119 | #define dynamic_pr_debug(fmt, ...) \ |
103 | do { if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); } while (0) | 120 | do { if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); } while (0) |
104 | #define dynamic_dev_dbg(dev, fmt, ...) \ | 121 | #define dynamic_dev_dbg(dev, fmt, ...) \ |