pstore: Centralize init/exit routines
In preparation for having additional actions during init/exit, this moves the init/exit into platform.c, centralizing the logic to make call outs to the fs init/exit. Signed-off-by: Kees Cook <keescook@chromium.org> Tested-by: Guenter Roeck <groeck@chromium.org>
This commit is contained in:
@@ -780,8 +780,31 @@ void __init pstore_choose_compression(void)
|
||||
}
|
||||
}
|
||||
|
||||
static int __init pstore_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
pstore_choose_compression();
|
||||
|
||||
ret = pstore_init_fs();
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
module_init(pstore_init)
|
||||
|
||||
static void __exit pstore_exit(void)
|
||||
{
|
||||
pstore_exit_fs();
|
||||
}
|
||||
module_exit(pstore_exit)
|
||||
|
||||
module_param(compress, charp, 0444);
|
||||
MODULE_PARM_DESC(compress, "Pstore compression to use");
|
||||
|
||||
module_param(backend, charp, 0444);
|
||||
MODULE_PARM_DESC(backend, "Pstore backend to use");
|
||||
|
||||
MODULE_AUTHOR("Tony Luck <tony.luck@intel.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
Reference in New Issue
Block a user