mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Omkhar Arasaratnam <omkhar@rogers.com>
To: b.zolnierkiewicz@elka.pw.edu.pl
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	kernel-janitors-disucss@lists.sf.net, trivial@rustcorp.com
Subject: [PATCH] drivers/ide/ide-probe.c MOD_INC/DEC_USE_COUNT fixup
Date: Mon, 29 Dec 2003 18:16:53 -0500	[thread overview]
Message-ID: <20031229231653.GA17346@omkhar.ibm.com> (raw)

Minor fixup to replace MOD_DEC_USE_COUNT/MOD_INC_USE_COUNT with module_put(THIS_MODULE)
and try_module_get(THIS_MODULE)

I am new are this so feel free to tell me if I have done something incorrectly.

This is mainly to clean up compiler #warnings since MOD_*_USE_COUNT macros are
depreciated in 2.6


--- linux-clean/drivers/ide/ide-probe.c.org	2003-12-29 18:06:21.000000000 -0500
+++ linux-clean/drivers/ide/ide-probe.c	2003-12-29 15:38:03.000000000 -0500
@@ -1323,7 +1323,7 @@
 	unsigned int index;
 	int probe[MAX_HWIFS];
 	
-	MOD_INC_USE_COUNT;
+	try_module_get(THIS_MODULE);
 	memset(probe, 0, MAX_HWIFS * sizeof(int));
 	for (index = 0; index < MAX_HWIFS; ++index)
 		probe[index] = !ide_hwifs[index].present;
@@ -1350,7 +1350,7 @@
 	}
 	if (!ide_probe)
 		ide_probe = &ideprobe_init;
-	MOD_DEC_USE_COUNT;
+	module_put(THIS_MODULE);
 	return 0;
 }


O

                 reply	other threads:[~2003-12-29 23:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20031229231653.GA17346@omkhar.ibm.com \
    --to=omkhar@rogers.com \
    --cc=b.zolnierkiewicz@elka.pw.edu.pl \
    --cc=kernel-janitors-disucss@lists.sf.net \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@rustcorp.com \
    /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