diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/misc.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sound/core/misc.c b/sound/core/misc.c index a9710e0c97af..1d29e678369e 100644 --- a/sound/core/misc.c +++ b/sound/core/misc.c | |||
@@ -35,8 +35,17 @@ void release_and_free_resource(struct resource *res) | |||
35 | EXPORT_SYMBOL(release_and_free_resource); | 35 | EXPORT_SYMBOL(release_and_free_resource); |
36 | 36 | ||
37 | #ifdef CONFIG_SND_VERBOSE_PRINTK | 37 | #ifdef CONFIG_SND_VERBOSE_PRINTK |
38 | void snd_verbose_printk(const char *file, int line, const char *format, ...) | 38 | static const char *sanity_file_name(const char *path) |
39 | { | 39 | { |
40 | if (*path == '/') | ||
41 | return strrchr(path, '/') + 1; | ||
42 | else | ||
43 | return path; | ||
44 | } | ||
45 | |||
46 | void snd_verbose_printk(const char *path, int line, const char *format, ...) | ||
47 | { | ||
48 | const char *file = sanity_file_name(path); | ||
40 | va_list args; | 49 | va_list args; |
41 | 50 | ||
42 | if (format[0] == '<' && format[1] >= '0' && format[1] <= '7' && format[2] == '>') { | 51 | if (format[0] == '<' && format[1] >= '0' && format[1] <= '7' && format[2] == '>') { |
@@ -56,8 +65,9 @@ EXPORT_SYMBOL(snd_verbose_printk); | |||
56 | #endif | 65 | #endif |
57 | 66 | ||
58 | #if defined(CONFIG_SND_DEBUG) && defined(CONFIG_SND_VERBOSE_PRINTK) | 67 | #if defined(CONFIG_SND_DEBUG) && defined(CONFIG_SND_VERBOSE_PRINTK) |
59 | void snd_verbose_printd(const char *file, int line, const char *format, ...) | 68 | void snd_verbose_printd(const char *path, int line, const char *format, ...) |
60 | { | 69 | { |
70 | const char *file = sanity_file_name(path); | ||
61 | va_list args; | 71 | va_list args; |
62 | 72 | ||
63 | if (format[0] == '<' && format[1] >= '0' && format[1] <= '7' && format[2] == '>') { | 73 | if (format[0] == '<' && format[1] >= '0' && format[1] <= '7' && format[2] == '>') { |