summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2009-11-09 18:02:41 +0000
committerShaun Ruffell <sruffell@digium.com>2009-11-09 18:02:41 +0000
commit81dc74462fffe74712a1d8392f0af2e19f78cf20 (patch)
treeea74a95a5ccff9c80a235fb0b258a9f8440a2192
parent5f0433b231f956ba33f4abdb0b31be17f169be2d (diff)
wcte12xp: Only print the new debounce messages when debug is set.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7535 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/wcte12xp/base.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c
index fba67a7..7bf392d 100644
--- a/drivers/dahdi/wcte12xp/base.c
+++ b/drivers/dahdi/wcte12xp/base.c
@@ -1475,10 +1475,12 @@ static inline void t1_check_alarms(struct t1 *wc)
if (wc->alarmcount >= (alarmdebounce/100))
alarms |= DAHDI_ALARM_RED;
else {
- if (!wc->alarmcount) /* starting to debounce LOF/LFA */
+ if (unlikely(debug && !wc->alarmcount)) {
+ /* starting to debounce LOF/LFA */
module_printk("LOF/LFA detected but "
"debouncing for %d ms\n",
alarmdebounce);
+ }
wc->alarmcount++;
}
} else
@@ -1488,9 +1490,11 @@ static inline void t1_check_alarms(struct t1 *wc)
if (wc->losalarmcount >= (losalarmdebounce/100))
alarms |= DAHDI_ALARM_RED;
else {
- if (!wc->losalarmcount) /* starting to debounce LOS */
+ if (unlikely(debug && !wc->losalarmcount)) {
+ /* starting to debounce LOS */
module_printk("LOS detected but debouncing "
"for %d ms\n", losalarmdebounce);
+ }
wc->losalarmcount++;
}
} else
@@ -1500,9 +1504,11 @@ static inline void t1_check_alarms(struct t1 *wc)
if (wc->aisalarmcount >= (aisalarmdebounce/100))
alarms |= DAHDI_ALARM_BLUE;
else {
- if (!wc->aisalarmcount) /* starting to debounce AIS */
+ if (unlikely(debug && !wc->aisalarmcount)) {
+ /* starting to debounce AIS */
module_printk("AIS detected but debouncing "
"for %d ms\n", aisalarmdebounce);
+ }
wc->aisalarmcount++;
}
} else
@@ -1536,10 +1542,12 @@ static inline void t1_check_alarms(struct t1 *wc)
if (wc->yelalarmcount >= (yelalarmdebounce/100))
alarms |= DAHDI_ALARM_YELLOW;
else {
- if (!wc->yelalarmcount) /* starting to debounce AIS */
+ if (unlikely(debug && !wc->yelalarmcount)) {
+ /* starting to debounce AIS */
module_printk("yelllow (RAI) detected but "
"debouncing for %d ms\n",
yelalarmdebounce);
+ }
wc->yelalarmcount++;
}
} else