diff options
-rwxr-xr-x | wct4xxp.c | 5 | ||||
-rwxr-xr-x | wctdm.c | 6 | ||||
-rwxr-xr-x | wcte11xp.c | 4 |
3 files changed, 14 insertions, 1 deletions
@@ -544,7 +544,10 @@ static int t4_open(struct zt_chan *chan) { #ifndef LINUX26 MOD_INC_USE_COUNT; +#else + try_module_get(THIS_MODULE); #endif + return 0; } @@ -552,6 +555,8 @@ static int t4_close(struct zt_chan *chan) { #ifndef LINUX26 MOD_DEC_USE_COUNT; +#else + module_put(THIS_MODULE); #endif return 0; } @@ -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; @@ -226,6 +226,8 @@ static int t1xxp_open(struct zt_chan *chan) wc->usecount++; #ifndef LINUX26 MOD_INC_USE_COUNT; +#else + try_module_get(THIS_MODULE); #endif return 0; } @@ -346,6 +348,8 @@ static int t1xxp_close(struct zt_chan *chan) wc->usecount--; #ifndef LINUX26 MOD_DEC_USE_COUNT; +#else + module_put(THIS_MODULE); #endif /* If we're dead, release us now */ if (!wc->usecount && wc->dead) |