summaryrefslogtreecommitdiff
path: root/wctdm.c
diff options
context:
space:
mode:
Diffstat (limited to 'wctdm.c')
-rwxr-xr-xwctdm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/wctdm.c b/wctdm.c
index 4fcb757..c0de7cf 100755
--- a/wctdm.c
+++ b/wctdm.c
@@ -1722,7 +1722,9 @@ static int wctdm_open(struct zt_chan *chan)
wc->usecount++;
#ifndef LINUX26
MOD_INC_USE_COUNT;
-#endif
+#else
+ try_module_get(THIS_MODULE);
+#endif
return 0;
}
@@ -1740,6 +1742,8 @@ static int wctdm_close(struct zt_chan *chan)
wc->usecount--;
#ifndef LINUX26
MOD_DEC_USE_COUNT;
+#else
+ module_put(THIS_MODULE);
#endif
for (x=0;x<wc->cards;x++)
wc->mod.fxs.idletxhookstate[x] = 1;