mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers/ide/ide-probe.c MOD_INC/DEC_USE_COUNT fixup
@ 2003-12-29 23:16 Omkhar Arasaratnam
  0 siblings, 0 replies; only message in thread
From: Omkhar Arasaratnam @ 2003-12-29 23:16 UTC (permalink / raw)
  To: b.zolnierkiewicz
  Cc: linux-kernel, linux-ide, kernel-janitors-disucss, trivial

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-12-29 23:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-29 23:16 [PATCH] drivers/ide/ide-probe.c MOD_INC/DEC_USE_COUNT fixup Omkhar Arasaratnam

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