mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
acpi_os_vprintf: Use printk_get_level() to avoid unnecessary KERN_CONT
acpi_os_vprintf currently always uses a KERN_CONT prefix which may be followed immediately by a proper KERN_<LEVEL>. Check if the buffer already has a KERN_<LEVEL> at the start of the buffer and avoid the unnecessary KERN_CONT. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
c8d2bc9bc3
commit
abc4b9a53e
1 changed files with 10 additions and 3 deletions
|
|
@ -162,11 +162,18 @@ void acpi_os_vprintf(const char *fmt, va_list args)
|
|||
if (acpi_in_debugger) {
|
||||
kdb_printf("%s", buffer);
|
||||
} else {
|
||||
printk(KERN_CONT "%s", buffer);
|
||||
if (printk_get_level(buffer))
|
||||
printk("%s", buffer);
|
||||
else
|
||||
printk(KERN_CONT "%s", buffer);
|
||||
}
|
||||
#else
|
||||
if (acpi_debugger_write_log(buffer) < 0)
|
||||
printk(KERN_CONT "%s", buffer);
|
||||
if (acpi_debugger_write_log(buffer) < 0) {
|
||||
if (printk_get_level(buffer))
|
||||
printk("%s", buffer);
|
||||
else
|
||||
printk(KERN_CONT "%s", buffer);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue