File tree Expand file tree Collapse file tree 3 files changed +28
-11
lines changed Expand file tree Collapse file tree 3 files changed +28
-11
lines changed Original file line number Diff line number Diff line change @@ -482,12 +482,10 @@ static struct file_system_type pstore_fs_type = {
482
482
.kill_sb = pstore_kill_sb ,
483
483
};
484
484
485
- static int __init init_pstore_fs (void )
485
+ int __init pstore_init_fs (void )
486
486
{
487
487
int err ;
488
488
489
- pstore_choose_compression ();
490
-
491
489
/* Create a convenient mount point for people to access pstore */
492
490
err = sysfs_create_mount_point (fs_kobj , "pstore" );
493
491
if (err )
@@ -500,14 +498,9 @@ static int __init init_pstore_fs(void)
500
498
out :
501
499
return err ;
502
500
}
503
- module_init (init_pstore_fs )
504
501
505
- static void __exit exit_pstore_fs (void )
502
+ void __exit pstore_exit_fs (void )
506
503
{
507
504
unregister_filesystem (& pstore_fs_type );
508
505
sysfs_remove_mount_point (fs_kobj , "pstore" );
509
506
}
510
- module_exit (exit_pstore_fs )
511
-
512
- MODULE_AUTHOR ("Tony Luck <tony.luck@intel.com>" );
513
- MODULE_LICENSE ("GPL" );
Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ extern bool pstore_is_mounted(void);
37
37
extern void pstore_record_init (struct pstore_record * record ,
38
38
struct pstore_info * psi );
39
39
40
- /* Called during module_init() */
41
- extern void __init pstore_choose_compression (void );
40
+ /* Called during pstore init/exit. */
41
+ int __init pstore_init_fs (void );
42
+ void __exit pstore_exit_fs (void );
42
43
43
44
#endif
Original file line number Diff line number Diff line change @@ -780,8 +780,31 @@ void __init pstore_choose_compression(void)
780
780
}
781
781
}
782
782
783
+ static int __init pstore_init (void )
784
+ {
785
+ int ret ;
786
+
787
+ pstore_choose_compression ();
788
+
789
+ ret = pstore_init_fs ();
790
+ if (ret )
791
+ return ret ;
792
+
793
+ return 0 ;
794
+ }
795
+ module_init (pstore_init )
796
+
797
+ static void __exit pstore_exit (void )
798
+ {
799
+ pstore_exit_fs ();
800
+ }
801
+ module_exit (pstore_exit )
802
+
783
803
module_param (compress , charp , 0444 );
784
804
MODULE_PARM_DESC (compress , "Pstore compression to use ");
785
805
786
806
module_param (backend , charp , 0444 );
787
807
MODULE_PARM_DESC (backend , "Pstore backend to use ");
808
+
809
+ MODULE_AUTHOR ("Tony Luck <tony.luck@intel.com>" );
810
+ MODULE_LICENSE ("GPL" );
You can’t perform that action at this time.
0 commit comments