summaryrefslogtreecommitdiffstats
path: root/fs/pstore/pmsg.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2015-10-20 00:39:03 -0700
committerTony Luck <tony.luck@intel.com>2015-10-22 08:59:18 -0700
commitee1d267423a1f8041e2b1a33fc23e4393c67677e (patch)
treeb53cdedcdc8f6a7b36f0342814b91005ce4955ea /fs/pstore/pmsg.c
parent1873041152d2e324e25ddeec5541b90c22c2dc0f (diff)
downloadlinux-ee1d267423a1f8041e2b1a33fc23e4393c67677e.tar.bz2
pstore: add pstore unregister
pstore doesn't support unregistering yet. It was marked as TODO. This patch adds some code to fix it: 1) Add functions to unregister kmsg/console/ftrace/pmsg. 2) Add a function to free compression buffer. 3) Unmap the memory and free it. 4) Add a function to unregister pstore filesystem. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Kees Cook <keescook@chromium.org> [Removed __exit annotation from ramoops_remove(). Reported by Arnd Bergmann] Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'fs/pstore/pmsg.c')
-rw-r--r--fs/pstore/pmsg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/pstore/pmsg.c b/fs/pstore/pmsg.c
index 5a2f05a16c1e..7de20cd3797f 100644
--- a/fs/pstore/pmsg.c
+++ b/fs/pstore/pmsg.c
@@ -114,3 +114,10 @@ err_class:
err:
return;
}
+
+void pstore_unregister_pmsg(void)
+{
+ device_destroy(pmsg_class, MKDEV(pmsg_major, 0));
+ class_destroy(pmsg_class);
+ unregister_chrdev(pmsg_major, PMSG_NAME);
+}