Commit 18730411 authored by Geliang Tang's avatar Geliang Tang Committed by Tony Luck

pstore: add a helper function pstore_register_kmsg

Add a new wrapper function pstore_register_kmsg to keep the
consistency with other similar pstore_register_* functions.
Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 549b39a9
...@@ -353,6 +353,11 @@ static struct kmsg_dumper pstore_dumper = { ...@@ -353,6 +353,11 @@ static struct kmsg_dumper pstore_dumper = {
.dump = pstore_dump, .dump = pstore_dump,
}; };
static void pstore_register_kmsg(void)
{
kmsg_dump_register(&pstore_dumper);
}
#ifdef CONFIG_PSTORE_CONSOLE #ifdef CONFIG_PSTORE_CONSOLE
static void pstore_console_write(struct console *con, const char *s, unsigned c) static void pstore_console_write(struct console *con, const char *s, unsigned c)
{ {
...@@ -442,7 +447,7 @@ int pstore_register(struct pstore_info *psi) ...@@ -442,7 +447,7 @@ int pstore_register(struct pstore_info *psi)
if (pstore_is_mounted()) if (pstore_is_mounted())
pstore_get_records(0); pstore_get_records(0);
kmsg_dump_register(&pstore_dumper); pstore_register_kmsg();
if ((psi->flags & PSTORE_FLAGS_FRAGILE) == 0) { if ((psi->flags & PSTORE_FLAGS_FRAGILE) == 0) {
pstore_register_console(); pstore_register_console();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment