Staging: comedi: comedi_fops: Avoid orphaned proc entry
commit bf279ece37d2a3eaaa9813fcd7a1d8a81eb29c20 upstream. Move comedi_proc_init to the end to avoid orphaned proc entry if module loading failed. Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Willy Tarreau <w@1wt.eu>
This commit is contained in:
committed by
Willy Tarreau
parent
bf98a1be38
commit
b673e043f9
@@ -2557,9 +2557,6 @@ static int __init comedi_init(void)
|
||||
|
||||
comedi_class->dev_attrs = comedi_dev_attrs;
|
||||
|
||||
/* XXX requires /proc interface */
|
||||
comedi_proc_init();
|
||||
|
||||
/* create devices files for legacy/manual use */
|
||||
for (i = 0; i < comedi_num_legacy_minors; i++) {
|
||||
struct comedi_device *dev;
|
||||
@@ -2576,6 +2573,9 @@ static int __init comedi_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* XXX requires /proc interface */
|
||||
comedi_proc_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
module_init(comedi_init);
|
||||
|
||||
Reference in New Issue
Block a user