summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/dahdi/wctdm24xxp/base.c10
-rw-r--r--drivers/dahdi/wctdm24xxp/wctdm24xxp.h1
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index 4968673..2fe0bdd 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -1815,10 +1815,12 @@ wctdm_voicedaa_check_hook(struct wctdm *wc, struct wctdm_module *const mod)
b = mod->isrshadow[1]; /* Voltage */
abs_voltage = abs(b);
- if (fxovoltage) {
- if (!(wc->framecount % 100)) {
- dev_info(&wc->vb.pdev->dev, "Port %d: Voltage: %d Debounce %d\n", mod->card + 1, b, fxo->battdebounce);
- }
+ if (fxovoltage && time_after(wc->framecount, fxo->display_fxovoltage)) {
+ /* Every 100 ms */
+ fxo->display_fxovoltage = wc->framecount + 100;
+ dev_info(&wc->vb.pdev->dev,
+ "Port %d: Voltage: %d Debounce %d\n",
+ mod->card + 1, b, fxo->battdebounce);
}
if (unlikely(DAHDI_RXSIG_INITIAL == mod->chan->chan.rxhooksig)) {
diff --git a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
index 721d26c..535cf8e 100644
--- a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
+++ b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
@@ -158,6 +158,7 @@ struct fxo {
int neonmwi_last_voltage;
unsigned int neonmwi_debounce;
unsigned int neonmwi_offcounter;
+ unsigned long display_fxovoltage;
};
struct fxs {