diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-09-15 17:34:39 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-09-15 17:34:39 +0000 |
commit | 137232a7cd5ffdaa93b813895369901f426e92d0 (patch) | |
tree | b8f00cddf80e1cb51bd7d92569ae9aa6920e6809 /ztdummy.c | |
parent | db5c3ea4e107fbc935fa11245894617d8a43f41c (diff) |
ZAPTEL_RATE is not a time period.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3032 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'ztdummy.c')
-rw-r--r-- | ztdummy.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -91,7 +91,8 @@ static void ztd_tasklet(unsigned long data); #endif #ifdef LINUX26 -#define ZAPTEL_RATE 1000 +#define ZAPTEL_RATE 1000 /* zaptel ticks per second */ +#define ZAPTEL_TIME (1000000 / ZAPTEL_RATE) /* zaptel tick time in us */ #ifndef USE_RTC /* New 2.6 kernel timer stuff */ static struct timer_list timer; @@ -149,7 +150,7 @@ static void ztdummy_rtc_interrupt(void *private_data) /* Is spinlock required here??? */ spin_lock_irqsave(&ztd->rtclock, flags); - ztd->counter += ZAPTEL_RATE; + ztd->counter += ZAPTEL_TIME; while (ztd->counter >= current_rate) { ztd->counter -= current_rate; /* Update of RTC IRQ rate isn't possible from interrupt handler :( */ @@ -169,7 +170,7 @@ static void ztdummy_timer(unsigned long param) timer.expires = jiffies + 1; add_timer(&timer); - ztd->counter += ZAPTEL_RATE; + ztd->counter += ZAPTEL_TIME; while (ztd->counter >= HZ) { ztd->counter -= HZ; zt_receive(&ztd->span); |