diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2004-01-06 13:26:44 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2004-01-06 13:26:44 +0000 |
commit | 80f25d9ed6ea4af860f3127bad4cf43bbd258b5c (patch) | |
tree | 09a511f55802af71ff92d3f846198a03b1dbd534 /zaptel.c | |
parent | abf800fc845ce8736704cbe769f831b73700fa04 (diff) |
Clean build on Linux 2.6, will need lots of testing
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@292 5390a7c7-147a-4af0-8ec9-7488f05a26cb
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; } |