diff options
author | Shaun Ruffell <sruffell@digium.com> | 2009-11-09 18:02:40 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2009-11-09 18:02:40 +0000 |
commit | 5f0433b231f956ba33f4abdb0b31be17f169be2d (patch) | |
tree | 2b7616ae2a93fc105c2f152cc3d5bd3254f0edbb | |
parent | 31d2bb4180dd3437c2297fcaf64217f2e150c08a (diff) |
wct4xxp: Only print the new debounce messages when debug is set.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7534 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | drivers/dahdi/wct4xxp/base.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index 498f43a..a13aa75 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -2562,10 +2562,12 @@ static void t4_check_alarms(struct t4 *wc, int span) if (ts->alarmcount >= alarmdebounce) alarms |= DAHDI_ALARM_RED; else { - if (!ts->alarmcount) /* starting to debounce LOF/LFA */ + if (unlikely(debug && !ts->alarmcount)) { + /* starting to debounce LOF/LFA */ printk(KERN_INFO "wct%dxxp: LOF/LFA detected " "on span %d but debouncing for %d ms\n", wc->numspans, span + 1, alarmdebounce); + } ts->alarmcount++; } } else @@ -2575,10 +2577,12 @@ static void t4_check_alarms(struct t4 *wc, int span) if (ts->losalarmcount >= losalarmdebounce) alarms |= DAHDI_ALARM_RED; else { - if (!ts->losalarmcount) /* starting to debounce LOS */ + if (unlikely(debug && !ts->losalarmcount)) { + /* starting to debounce LOS */ printk(KERN_INFO "wct%dxxp: LOS detected on " "span %d but debouncing for %d ms\n", wc->numspans, span + 1, losalarmdebounce); + } ts->losalarmcount++; } } else @@ -2588,10 +2592,12 @@ static void t4_check_alarms(struct t4 *wc, int span) if (ts->aisalarmcount >= aisalarmdebounce) alarms |= DAHDI_ALARM_BLUE; else { - if (!ts->aisalarmcount) /* starting to debounce AIS */ + if (unlikely(debug && !ts->aisalarmcount)) { + /* starting to debounce AIS */ printk(KERN_INFO "wct%dxxp: AIS detected on " "span %d but debouncing for %d ms\n", wc->numspans, span + 1, aisalarmdebounce); + } ts->aisalarmcount++; } } else @@ -2637,12 +2643,14 @@ static void t4_check_alarms(struct t4 *wc, int span) if (ts->yelalarmcount >= yelalarmdebounce) alarms |= DAHDI_ALARM_YELLOW; else { - if (!ts->yelalarmcount) /* starting to debounce AIS */ + if (unlikely(debug && !ts->yelalarmcount)) { + /* starting to debounce AIS */ printk(KERN_INFO "wct%dxxp: yelllow (RAI) " "detected on span %d but debouncing " "for %d ms\n", wc->numspans, span + 1, yelalarmdebounce); + } ts->yelalarmcount++; } } else |