mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2025-04-19 20:58:31 +09:00
treewide: Convert new and leftover hrtimer_init() users
hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Coccinelle scripted cleanup. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
8fa7292fee
commit
48ad7bbfd5
@ -232,8 +232,7 @@ static void walkera0701_attach(struct parport *pp)
|
||||
goto err_unregister_device;
|
||||
}
|
||||
|
||||
hrtimer_init(&w->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
w->timer.function = timer_handler;
|
||||
hrtimer_setup(&w->timer, timer_handler, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
|
||||
w->input_dev = input_allocate_device();
|
||||
if (!w->input_dev) {
|
||||
|
@ -590,9 +590,8 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
|
||||
|
||||
INIT_DELAYED_WORK(&bdata->work, gpio_keys_gpio_work_func);
|
||||
|
||||
hrtimer_init(&bdata->debounce_timer,
|
||||
CLOCK_REALTIME, HRTIMER_MODE_REL);
|
||||
bdata->debounce_timer.function = gpio_keys_debounce_timer;
|
||||
hrtimer_setup(&bdata->debounce_timer, gpio_keys_debounce_timer,
|
||||
CLOCK_REALTIME, HRTIMER_MODE_REL);
|
||||
|
||||
isr = gpio_keys_gpio_isr;
|
||||
irqflags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING;
|
||||
@ -628,9 +627,8 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
|
||||
}
|
||||
|
||||
bdata->release_delay = button->debounce_interval;
|
||||
hrtimer_init(&bdata->release_timer,
|
||||
CLOCK_REALTIME, HRTIMER_MODE_REL_HARD);
|
||||
bdata->release_timer.function = gpio_keys_irq_timer;
|
||||
hrtimer_setup(&bdata->release_timer, gpio_keys_irq_timer,
|
||||
CLOCK_REALTIME, HRTIMER_MODE_REL_HARD);
|
||||
|
||||
isr = gpio_keys_irq_isr;
|
||||
irqflags = 0;
|
||||
|
@ -441,8 +441,8 @@ static enum hrtimer_restart nsim_napi_schedule(struct hrtimer *timer)
|
||||
|
||||
static void nsim_rq_timer_init(struct nsim_rq *rq)
|
||||
{
|
||||
hrtimer_init(&rq->napi_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
rq->napi_timer.function = nsim_napi_schedule;
|
||||
hrtimer_setup(&rq->napi_timer, nsim_napi_schedule, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
}
|
||||
|
||||
static void nsim_enable_napi(struct netdevsim *ns)
|
||||
|
@ -227,8 +227,8 @@ static int pps_gen_tio_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(tio->base);
|
||||
|
||||
pps_tio_disable(tio);
|
||||
hrtimer_init(&tio->timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
|
||||
tio->timer.function = hrtimer_callback;
|
||||
hrtimer_setup(&tio->timer, hrtimer_callback, CLOCK_REALTIME,
|
||||
HRTIMER_MODE_ABS);
|
||||
spin_lock_init(&tio->lock);
|
||||
platform_set_drvdata(pdev, &tio);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user