Skip to content

Commit

Permalink
pstore: add a helper function pstore_register_kmsg
Browse files Browse the repository at this point in the history
Add a new wrapper function pstore_register_kmsg to keep the
consistency with other similar pstore_register_* functions.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Geliang Tang authored and Tony Luck committed Oct 21, 2015
1 parent 549b39a commit 1873041
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fs/pstore/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ static struct kmsg_dumper pstore_dumper = {
.dump = pstore_dump,
};

static void pstore_register_kmsg(void)
{
kmsg_dump_register(&pstore_dumper);
}

#ifdef CONFIG_PSTORE_CONSOLE
static void pstore_console_write(struct console *con, const char *s, unsigned c)
{
Expand Down Expand Up @@ -442,7 +447,7 @@ int pstore_register(struct pstore_info *psi)
if (pstore_is_mounted())
pstore_get_records(0);

kmsg_dump_register(&pstore_dumper);
pstore_register_kmsg();

if ((psi->flags & PSTORE_FLAGS_FRAGILE) == 0) {
pstore_register_console();
Expand Down

0 comments on commit 1873041

Please sign in to comment.