From a5a52dbe94269722d2997350912e5b8cc1090f22 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Mon, 4 Nov 2013 09:07:29 -0600 Subject: [PATCH] wct4xxp: VPM companding switch print is now debug only. This print happened when the linemode was changed via sysfs, but it didn't really add much extra information that a user could act on. Signed-off-by: Shaun Ruffell --- drivers/dahdi/wct4xxp/base.c | 2 +- drivers/dahdi/wct4xxp/vpm450m.c | 6 ++++-- drivers/dahdi/wct4xxp/vpm450m.h | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index a4c62dc..0f9e750 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -183,7 +183,7 @@ static inline int t4_queue_work(struct workqueue_struct *wq, struct work_struct "CONFIG_NOEXTENDED_RESET." #endif -static int debug=0; +int debug = 0; static int timingcable = 0; static int t1e1override = -1; /* deprecated */ static char *default_linemode = "auto"; diff --git a/drivers/dahdi/wct4xxp/vpm450m.c b/drivers/dahdi/wct4xxp/vpm450m.c index fcd0672..a35f49d 100644 --- a/drivers/dahdi/wct4xxp/vpm450m.c +++ b/drivers/dahdi/wct4xxp/vpm450m.c @@ -256,8 +256,10 @@ void vpm450m_set_alaw_companding(struct vpm450m *vpm450m, int channel, pr_notice("Failed to apply echo can changes on channel %d %d %08x!\n", vpm450m->aulEchoChanHndl[channel], channel, ulResult); } else { - pr_info("Changed companding on channel %d to %s.\n", channel, - (alaw) ? "alaw" : "ulaw"); + if (debug) { + pr_info("Changed companding on channel %d to %s.\n", + channel, (alaw) ? "alaw" : "ulaw"); + } if (alaw) vpm450m->chanflags[channel] |= FLAG_ALAW; else diff --git a/drivers/dahdi/wct4xxp/vpm450m.h b/drivers/dahdi/wct4xxp/vpm450m.h index adf4150..0a1486b 100644 --- a/drivers/dahdi/wct4xxp/vpm450m.h +++ b/drivers/dahdi/wct4xxp/vpm450m.h @@ -42,4 +42,6 @@ void release_vpm450m(struct vpm450m *instance); void vpm450m_set_alaw_companding(struct vpm450m *vpm450m, int channel, bool alaw); +extern int debug; + #endif