From 80f25d9ed6ea4af860f3127bad4cf43bbd258b5c Mon Sep 17 00:00:00 2001 From: markster Date: Tue, 6 Jan 2004 13:26:44 +0000 Subject: 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 --- zaptel.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'zaptel.c') diff --git a/zaptel.c b/zaptel.c index de3e4af..e6380d4 100755 --- a/zaptel.c +++ b/zaptel.c @@ -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; } -- cgit v1.2.3