summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorCheah Kok Cheong <thrust73@gmail.com>2016-12-30 19:25:52 +0800
committerSasha Levin <alexander.levin@verizon.com>2017-09-10 16:35:47 -0400
commit156660f3c25d060c2c12273c945af2fe54429c28 (patch)
treec33f6e601b7823c09ad1cd1806110894f611b8d4 /drivers/staging
parent773853e95c88fe2154fecd80c85c0ffc70786798 (diff)
Staging: comedi: comedi_fops: Avoid orphaned proc entry
[ Upstream commit bf279ece37d2a3eaaa9813fcd7a1d8a81eb29c20 ] 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: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/comedi/comedi_fops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index a503132f91e8..ab6139b5472f 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2875,9 +2875,6 @@ static int __init comedi_init(void)
comedi_class->dev_groups = comedi_dev_groups;
- /* 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;
@@ -2895,6 +2892,9 @@ static int __init comedi_init(void)
mutex_unlock(&dev->mutex);
}
+ /* XXX requires /proc interface */
+ comedi_proc_init();
+
return 0;
}
module_init(comedi_init);