4 * the #define USE_RTC should be commented out.
6 #if defined(__i386__) || defined(__x86_64__)
7 -#if LINUX_VERSION_CODE >= VERSION_CODE(2,6,13)
8 +#if LINUX_VERSION_CODE >= VERSION_CODE(2,6,15)
9 /* The symbol hrtimer_forward is only exported as of 2.6.22: */
10 #if defined(CONFIG_HIGH_RES_TIMERS) && LINUX_VERSION_CODE >= VERSION_CODE(2,6,22)
11 #define USE_HIGHRESTIMER
16 +#if defined(USE_HIGHRESTIMER) && ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) )
17 +/* compatibility with new hrtimer interface */
18 +static inline ktime_t hrtimer_get_expires(const struct hrtimer *timer)
20 + return timer->expires;
23 +static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
25 + timer->expires = time;
29 static struct ztdummy *ztd;
31 @@ -200,7 +212,7 @@ static enum hrtimer_restart ztdummy_hr_i
33 * We should worry if overrun is 2 or more; then we really missed
35 - overrun = hrtimer_forward(&zaptimer, htmr->expires,
36 + overrun = hrtimer_forward(&zaptimer, hrtimer_get_expires(htmr),
37 ktime_set(0, ZAPTEL_TIME_NS));
39 if(printk_ratelimit())
40 @@ -223,7 +235,7 @@ static enum hrtimer_restart ztdummy_hr_i
41 /* use kernel system tick timer if PC architecture RTC is not available */
42 static void ztdummy_timer(unsigned long param)
44 - timer.expires = jiffies + 1;
45 + hrtimer_set_expires(timer, jiffies + 1);
48 ztd->counter += ZAPTEL_TIME;