diff options
author | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-05-16 21:39:47 +0000 |
---|---|---|
committer | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-05-16 21:39:47 +0000 |
commit | dd3fad8de5df2f25630d66154f209b6b7cbf4049 (patch) | |
tree | ed5c05bf8715f685b46da469d8d7c22cc0d8c0dc /kernel/ztdummy.c | |
parent | 5e00740361c43a489bff5d280a80fe7285ea9231 (diff) |
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4301 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'kernel/ztdummy.c')
-rw-r--r-- | kernel/ztdummy.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/ztdummy.c b/kernel/ztdummy.c index 82a5550..18f1e9f 100644 --- a/kernel/ztdummy.c +++ b/kernel/ztdummy.c @@ -135,9 +135,9 @@ extern uhci_t **uhci_devices; #endif -#define DAHDI_RATE 1000 /* zaptel ticks per second */ -#define DAHDI_TIME (1000000 / DAHDI_RATE) /* zaptel tick time in us */ -#define DAHDI_TIME_NS (DAHDI_TIME * 1000) /* zaptel tick time in ns */ +#define ZAPTEL_RATE 1000 /* zaptel ticks per second */ +#define ZAPTEL_TIME (1000000 / ZAPTEL_RATE) /* zaptel tick time in us */ +#define ZAPTEL_TIME_NS (ZAPTEL_TIME * 1000) /* zaptel tick time in ns */ /* Different bits of the debug variable: */ #define DEBUG_GENERAL (1 << 0) @@ -174,7 +174,7 @@ static void ztdummy_rtc_interrupt(void *private_data) /* Is spinlock required here??? */ spin_lock_irqsave(&ztd->rtclock, flags); - ztd->counter += DAHDI_TIME; + ztd->counter += ZAPTEL_TIME; while (ztd->counter >= current_rate) { ztd->counter -= current_rate; /* Update of RTC IRQ rate isn't possible from interrupt handler :( */ @@ -201,7 +201,7 @@ static enum hrtimer_restart ztdummy_hr_int(struct hrtimer *htmr) * We should worry if overrun is 2 or more; then we really missed * a tick */ overrun = hrtimer_forward(&zaptimer, htmr->expires, - ktime_set(0, DAHDI_TIME_NS)); + ktime_set(0, ZAPTEL_TIME_NS)); if(overrun > 1) { if(printk_ratelimit()) printk(KERN_NOTICE "ztdummy: HRTimer missed %lu ticks\n", @@ -226,7 +226,7 @@ static void ztdummy_timer(unsigned long param) timer.expires = jiffies + 1; add_timer(&timer); - ztd->counter += DAHDI_TIME; + ztd->counter += ZAPTEL_TIME; while (ztd->counter >= HZ) { ztd->counter -= HZ; zt_receive(&ztd->span); @@ -343,7 +343,7 @@ int init_module(void) zaptimer.function = ztdummy_hr_int; printk(KERN_DEBUG "ztdummy: Starting High Resolution Timer\n"); - hrtimer_start(&zaptimer, ktime_set(0, DAHDI_TIME_NS), HRTIMER_MODE_REL); + hrtimer_start(&zaptimer, ktime_set(0, ZAPTEL_TIME_NS), HRTIMER_MODE_REL); printk(KERN_INFO "ztdummy: High Resolution Timer started, good to go\n"); #else init_timer(&timer); |