diff options
-rwxr-xr-x | wcfxs.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1704,15 +1704,15 @@ static int wcfxs_watchdog(struct zt_span *span, int event) static int wcfxs_close(struct zt_chan *chan) { struct wcfxs *wc = chan->pvt; - int x; 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; + if (wc->modtype[chan->chanpos - 1] == MOD_TYPE_FXS) + wc->mod.fxs.idletxhookstate[chan->chanpos - 1] = 1; + /* If we're dead, release us now */ if (!wc->usecount && wc->dead) wcfxs_release(wc); |