Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: Switch to use hrtimer_setup()

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.

Patch was created by using Coccinelle.

Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Signed-off-by: Nam Cao <namcao@linutronix.de>
Link: https://lore.kernel.org/r/62db561622799dfc8d58682ca41b54e3f1ff6949.1738746904.git.namcao@linutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Nam Cao and committed by
Dmitry Torokhov
a7550ff5 ab497697

+5 -8
+1 -2
drivers/input/joystick/walkera0701.c
··· 232 232 goto err_unregister_device; 233 233 } 234 234 235 - hrtimer_init(&w->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 236 - w->timer.function = timer_handler; 235 + hrtimer_setup(&w->timer, timer_handler, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 237 236 238 237 w->input_dev = input_allocate_device(); 239 238 if (!w->input_dev) {
+4 -6
drivers/input/keyboard/gpio_keys.c
··· 590 590 591 591 INIT_DELAYED_WORK(&bdata->work, gpio_keys_gpio_work_func); 592 592 593 - hrtimer_init(&bdata->debounce_timer, 594 - CLOCK_REALTIME, HRTIMER_MODE_REL); 595 - bdata->debounce_timer.function = gpio_keys_debounce_timer; 593 + hrtimer_setup(&bdata->debounce_timer, gpio_keys_debounce_timer, CLOCK_REALTIME, 594 + HRTIMER_MODE_REL); 596 595 597 596 isr = gpio_keys_gpio_isr; 598 597 irqflags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING; ··· 627 628 } 628 629 629 630 bdata->release_delay = button->debounce_interval; 630 - hrtimer_init(&bdata->release_timer, 631 - CLOCK_REALTIME, HRTIMER_MODE_REL_HARD); 632 - bdata->release_timer.function = gpio_keys_irq_timer; 631 + hrtimer_setup(&bdata->release_timer, gpio_keys_irq_timer, CLOCK_REALTIME, 632 + HRTIMER_MODE_REL_HARD); 633 633 634 634 isr = gpio_keys_irq_isr; 635 635 irqflags = 0;