diff options
author | Sean Bright <sean@malleable.com> | 2008-11-09 00:33:16 +0000 |
---|---|---|
committer | Sean Bright <sean@malleable.com> | 2008-11-09 00:33:16 +0000 |
commit | 7f7180b3d73cb7073d0a00d33ee9fe286139a0c5 (patch) | |
tree | 66430bb2a5b8c3c4e3b2ff6677464faf7d0f0dec /drivers/dahdi/dahdi-base.c | |
parent | 02485dff97f27c26523720f4670c23781670eecf (diff) |
We only use print_debug_writebuf when CONFIG_DAHDI_NET or CONFIG_DAHDI_PPP are defined, so only define it in those cases as well.
Reported & Tested by: KP7 via #asterisk-dev
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5270 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/dahdi-base.c')
-rw-r--r-- | drivers/dahdi/dahdi-base.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index 915fcfe..644ca0e 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -1495,6 +1495,18 @@ char *dahdi_lboname(int x) } #if defined(CONFIG_DAHDI_NET) || defined(CONFIG_DAHDI_PPP) +static inline void print_debug_writebuf(struct dahdi_chan* ss, struct sk_buff *skb, int oldbuf) +{ +#ifdef CONFIG_DAHDI_DEBUG + int x; + + module_printk(KERN_NOTICE, "Buffered %d bytes to go out in buffer %d\n", ss->writen[oldbuf], oldbuf); + module_printk(KERN_DEBUG ""); + for (x=0;x<ss->writen[oldbuf];x++) + printk("%02x ", ss->writebuf[oldbuf][x]); + printk("\n"); +#endif +} #endif #ifdef CONFIG_DAHDI_NET @@ -1637,20 +1649,6 @@ static struct dahdi_hdlc *dahdi_hdlc_alloc(void) return kzalloc(sizeof(struct dahdi_hdlc), GFP_KERNEL); } -static inline void print_debug_writebuf(struct dahdi_chan* ss, struct sk_buff *skb, - int oldbuf) -{ -#ifdef CONFIG_DAHDI_DEBUG - int x; - - module_printk(KERN_NOTICE, "Buffered %d bytes to go out in buffer %d\n", ss->writen[oldbuf], oldbuf); - module_printk(KERN_DEBUG ""); - for (x=0;x<ss->writen[oldbuf];x++) - printk("%02x ", ss->writebuf[oldbuf][x]); - printk("\n"); -#endif -} - #ifdef NEW_HDLC_INTERFACE static int dahdi_xmit(struct sk_buff *skb, struct net_device *dev) { |