dahdi_dummy: Fix timer_setup API usage.

It looked like the recent change to add support for timer_setup was not
completely implemented / tested with dahdi_dummy. I was using it to
check some changes to the timekeeping API when I noticed this.

This does not really affect anyone since, by default, dahdi_dummy is no
longer built and even if it was built, it would not use the standard
timer interface by default on newer kernels.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
This commit is contained in:
Shaun Ruffell 2019-01-10 03:55:26 +00:00
parent ac50b368aa
commit 9991c959ef

View File

@ -156,7 +156,7 @@ static unsigned long timespec_diff_ms(struct timespec *t0, struct timespec *t1)
return ms; return ms;
} }
static void dahdi_dummy_timer(struct timer_timer *unused) static void dahdi_dummy_timer(TIMER_DATA_TYPE unused)
{ {
unsigned long ms_since_start; unsigned long ms_since_start;
struct timespec now; struct timespec now;
@ -257,7 +257,7 @@ int init_module(void)
hrtimer_start(&zaptimer, ktime_set(0, DAHDI_TIME_NS), HRTIMER_MODE_REL); hrtimer_start(&zaptimer, ktime_set(0, DAHDI_TIME_NS), HRTIMER_MODE_REL);
printk(KERN_INFO "dahdi_dummy: High Resolution Timer started, good to go\n"); printk(KERN_INFO "dahdi_dummy: High Resolution Timer started, good to go\n");
#else #else
timer_setup(&timer, dahdi_dummy_timer); timer_setup(&timer, dahdi_dummy_timer, 0);
ztd->start_interval = current_kernel_time(); ztd->start_interval = current_kernel_time();
atomic_set(&shutdown, 0); atomic_set(&shutdown, 0);
mod_timer(&timer, jiffies + JIFFIES_INTERVAL); mod_timer(&timer, jiffies + JIFFIES_INTERVAL);