summaryrefslogtreecommitdiff
path: root/wcfxs.c
diff options
context:
space:
mode:
Diffstat (limited to 'wcfxs.c')
-rwxr-xr-xwcfxs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/wcfxs.c b/wcfxs.c
index 4377298..8a21d9b 100755
--- a/wcfxs.c
+++ b/wcfxs.c
@@ -1660,7 +1660,9 @@ static int wcfxs_open(struct zt_chan *chan)
wc->usecount++;
#ifndef LINUX26
MOD_INC_USE_COUNT;
-#endif
+#else
+ try_module_get(THIS_MODULE);
+#endif
return 0;
}
@@ -1678,6 +1680,8 @@ static int wcfxs_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;