Commit b5a48676 authored by Cheah Kok Cheong's avatar Cheah Kok Cheong Committed by Greg Kroah-Hartman

Staging: comedi: comedi_fops: Avoid orphaned proc entry

commit bf279ece upstream.

Move comedi_proc_init to the end to avoid orphaned proc entry
if module loading failed.
Signed-off-by: default avatarCheah Kok Cheong <thrust73@gmail.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0c335d55
...@@ -2901,9 +2901,6 @@ static int __init comedi_init(void) ...@@ -2901,9 +2901,6 @@ static int __init comedi_init(void)
comedi_class->dev_groups = comedi_dev_groups; comedi_class->dev_groups = comedi_dev_groups;
/* XXX requires /proc interface */
comedi_proc_init();
/* create devices files for legacy/manual use */ /* create devices files for legacy/manual use */
for (i = 0; i < comedi_num_legacy_minors; i++) { for (i = 0; i < comedi_num_legacy_minors; i++) {
struct comedi_device *dev; struct comedi_device *dev;
...@@ -2921,6 +2918,9 @@ static int __init comedi_init(void) ...@@ -2921,6 +2918,9 @@ static int __init comedi_init(void)
mutex_unlock(&dev->mutex); mutex_unlock(&dev->mutex);
} }
/* XXX requires /proc interface */
comedi_proc_init();
return 0; return 0;
} }
module_init(comedi_init); module_init(comedi_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment