mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cheah Kok Cheong <thrust73@gmail.com>
To: abbotti@mev.co.uk, hsweeten@visionengravers.com,
	gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Cheah Kok Cheong <thrust73@gmail.com>
Subject: [PATCH 1/5] Staging: comedi: comedi_fops: Avoid orphaned proc entry
Date: Fri, 30 Dec 2016 19:25:52 +0800	[thread overview]
Message-ID: <6635b2bc18f3661d64ff5039ec47bbdac3cdbebb.1483094820.git.thrust73@gmail.com> (raw)
In-Reply-To: <cover.1483094820.git.thrust73@gmail.com>

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>
---
 drivers/staging/comedi/comedi_fops.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 64b3966..02df354 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2898,9 +2898,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;
@@ -2917,6 +2914,9 @@ static int __init comedi_init(void)
 		mutex_unlock(&dev->mutex);
 	}
 
+	/* XXX requires /proc interface */
+	comedi_proc_init();
+
 	return 0;
 }
 module_init(comedi_init);
-- 
2.7.4

  reply	other threads:[~2016-12-30 11:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-30 11:24 [PATCH 0/5] Staging: comedi: Proc FS related cleanup Cheah Kok Cheong
2016-12-30 11:25 ` Cheah Kok Cheong [this message]
2016-12-30 11:26 ` [PATCH 2/5] Staging: comedi: proc: Change file permission to read only Cheah Kok Cheong
2016-12-30 11:26 ` [PATCH 3/5] Staging: comedi: proc: Add __init prefix Cheah Kok Cheong
2016-12-30 11:27 ` [PATCH 4/5] Staging: comedi: proc: Add module owner Cheah Kok Cheong
2016-12-30 11:27 ` [PATCH 5/5] Staging: comedi: proc: Warn if unable to create proc entry Cheah Kok Cheong
2017-01-03 10:43 ` [PATCH 0/5] Staging: comedi: Proc FS related cleanup Ian Abbott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6635b2bc18f3661d64ff5039ec47bbdac3cdbebb.1483094820.git.thrust73@gmail.com \
    --to=thrust73@gmail.com \
    --cc=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome