fs/pstore: update the backend parameter in pstore module
authorWang Long <long.wanglong@huawei.com>
Thu, 21 May 2015 16:34:22 +0000 (09:34 -0700)
committerTony Luck <tony.luck@intel.com>
Thu, 21 May 2015 16:34:22 +0000 (09:34 -0700)
This patch update the module parameter backend, so it is visible
through /sys/module/pstore/parameters/backend.

For example:
if pstore backend is ramoops, with this patch:
# cat /sys/module/pstore/parameters/backend
ramoops
and without this patch:
# cat /sys/module/pstore/parameters/backend
(null)

Signed-off-by: Wang Long <long.wanglong@huawei.com>
Acked-by: Mark Salyzyn <salyzyn@android.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
fs/pstore/platform.c

index de525ec0b490b2a9b4a0b3d907f1732074eea1af..791743deedf1b389177225a66d5a0967f2026b25 100644 (file)
@@ -456,6 +456,12 @@ int pstore_register(struct pstore_info *psi)
                add_timer(&pstore_timer);
        }
 
+       /*
+        * Update the module parameter backend, so it is visible
+        * through /sys/module/pstore/parameters/backend
+        */
+       backend = psi->name;
+
        pr_info("Registered %s as persistent store backend\n", psi->name);
 
        return 0;