diff options
Diffstat (limited to 'zaptel.c')
-rwxr-xr-x | zaptel.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -1184,7 +1184,9 @@ static int zt_net_open(hdlc_device *hdlc) fasthdlc_init(&ms->txhdlc); ms->infcs = PPP_INITFCS; +#ifndef LINUX26 MOD_INC_USE_COUNT; +#endif #if CONFIG_ZAPATA_DEBUG printk("ZAPNET: Opened channel %d name %s\n", ms->channo, ms->name); #endif @@ -1220,7 +1222,9 @@ static void zt_net_close(hdlc_device *hdlc) } /* Not much to do here. Just deallocate the buffers */ zt_reallocbufs(ms, 0, 0); +#ifndef LINUX26 MOD_DEC_USE_COUNT; +#endif #ifdef NEW_HDLC_INTERFACE return 0; #else @@ -1678,28 +1682,36 @@ static ssize_t zt_chan_write(struct file *file, const char *usrbuf, size_t count static int zt_ctl_open(struct inode *inode, struct file *file) { /* Nothing to do, really */ +#ifndef LINUX26 MOD_INC_USE_COUNT; +#endif return 0; } static int zt_chan_open(struct inode *inode, struct file *file) { /* Nothing to do here for now either */ +#ifndef LINUX26 MOD_INC_USE_COUNT; +#endif return 0; } static int zt_ctl_release(struct inode *inode, struct file *file) { /* Nothing to do */ +#ifndef LINUX26 MOD_DEC_USE_COUNT; +#endif return 0; } static int zt_chan_release(struct inode *inode, struct file *file) { /* Nothing to do for now */ +#ifndef LINUX26 MOD_DEC_USE_COUNT; +#endif return 0; } @@ -2000,7 +2012,9 @@ static int zt_timing_open(struct inode *inode, struct file *file) memset(t, 0, sizeof(struct zt_timer)); init_waitqueue_head(&t->sel); file->private_data = t; +#ifndef LINUX26 MOD_INC_USE_COUNT; +#endif spin_lock_irqsave(&zaptimerlock, flags); t->next = zaptimers; zaptimers = t; @@ -2035,7 +2049,9 @@ static int zt_timer_release(struct inode *inode, struct file *file) return 0; } kfree(t); +#ifndef LINUX26 MOD_DEC_USE_COUNT; +#endif } return 0; } @@ -2063,8 +2079,10 @@ static int zt_specchan_open(struct inode *inode, struct file *file, int unit, in res = chans[unit]->span->open(chans[unit]); if (!res) { chans[unit]->file = file; +#ifndef LINUX26 if (inc) MOD_INC_USE_COUNT; +#endif chans[unit]->flags |= ZT_FLAG_OPEN; } else { close_channel(chans[unit]); @@ -2086,7 +2104,9 @@ static int zt_specchan_release(struct inode *node, struct file *file, int unit) res = chans[unit]->span->close(chans[unit]); } else res = -ENXIO; +#ifndef LINUX26 MOD_DEC_USE_COUNT; +#endif return res; } |