Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Mon, 29 Dec 2003 18:16:53 -0500 | From | Omkhar Arasaratnam <> | Subject | [PATCH] drivers/ide/ide-probe.c MOD_INC/DEC_USE_COUNT fixup |
| |
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |