[dahdi-commits] sruffell: linux/trunk r7535 - /linux/trunk/drivers/dahdi/wcte12xp/base.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Mon Nov 9 12:02:48 CST 2009
Author: sruffell
Date: Mon Nov 9 12:02:41 2009
New Revision: 7535
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7535
Log:
wcte12xp: Only print the new debounce messages when debug is set.
Modified:
linux/trunk/drivers/dahdi/wcte12xp/base.c
Modified: linux/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=7535&r1=7534&r2=7535
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/base.c Mon Nov 9 12:02:41 2009
@@ -1475,10 +1475,12 @@
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 @@
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 @@
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 @@
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
More information about the dahdi-commits
mailing list