diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-08-03 12:59:38 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-08-03 12:59:38 +0200 |
commit | d30a0d839a5a282e43353fee53d5dc70db5eceda (patch) | |
tree | 189a91615be3174a9ff8b20937359d11298433af /sound/core | |
parent | fcfb7866af9a5d0280b7e51dd772990c636b7dec (diff) | |
parent | 988aec3de5f0fa848f26fbf64f9e83364d6b3c25 (diff) | |
download | op-kernel-dev-d30a0d839a5a282e43353fee53d5dc70db5eceda.zip op-kernel-dev-d30a0d839a5a282e43353fee53d5dc70db5eceda.tar.gz |
Merge branch 'topic/next' into for-next
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/misc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sound/core/misc.c b/sound/core/misc.c index 7681679..30e027e 100644 --- a/sound/core/misc.c +++ b/sound/core/misc.c @@ -68,6 +68,7 @@ void __snd_printk(unsigned int level, const char *path, int line, { va_list args; #ifdef CONFIG_SND_VERBOSE_PRINTK + int kern_level; struct va_format vaf; char verbose_fmt[] = KERN_DEFAULT "ALSA %s:%d %pV"; #endif @@ -81,12 +82,16 @@ void __snd_printk(unsigned int level, const char *path, int line, #ifdef CONFIG_SND_VERBOSE_PRINTK vaf.fmt = format; vaf.va = &args; - if (format[0] == '<' && format[2] == '>') { - memcpy(verbose_fmt, format, 3); - vaf.fmt = format + 3; + + kern_level = printk_get_level(format); + if (kern_level) { + const char *end_of_header = printk_skip_level(format); + memcpy(verbose_fmt, format, end_of_header - format); + vaf.fmt = end_of_header; } else if (level) - memcpy(verbose_fmt, KERN_DEBUG, 3); + memcpy(verbose_fmt, KERN_DEBUG, sizeof(KERN_DEBUG) - 1); printk(verbose_fmt, sanity_file_name(path), line, &vaf); + #else vprintk(format, args); #endif |