diff options
Diffstat (limited to 'drivers/dahdi/wctdm24xxp/base.c')
-rw-r--r-- | drivers/dahdi/wctdm24xxp/base.c | 10 |
1 files changed, 6 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)) { |