summaryrefslogtreecommitdiff
path: root/kernel/printk/printk.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/printk/printk.c')
-rw-r--r--kernel/printk/printk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index dca87791e9c1..da573aeaeb12 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2119,6 +2119,8 @@ void resume_console(void)
console_unlock();
}
+#ifdef CONFIG_CONSOLE_FLUSH_ON_HOTPLUG
+
/**
* console_cpu_notify - print deferred console messages after CPU hotplug
* @self: notifier struct
@@ -2148,6 +2150,8 @@ static int console_cpu_notify(struct notifier_block *self,
return NOTIFY_OK;
}
+#endif
+
/**
* console_lock - lock the console system for exclusive use.
*
@@ -2712,7 +2716,9 @@ static int __init printk_late_init(void)
unregister_console(con);
}
}
+#ifdef CONFIG_CONSOLE_FLUSH_ON_HOTPLUG
hotcpu_notifier(console_cpu_notify, 0);
+#endif
return 0;
}
late_initcall(printk_late_init);