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

igc: 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.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/baeaabb84aef1803dfae385f6e9614d6fc547667.1738746872.git.namcao@linutronix.de

authored by

Nam Cao and committed by
Thomas Gleixner
e26ad10d 1528fd73

+2 -2
+2 -2
drivers/net/ethernet/intel/igc/igc_main.c
··· 7090 7090 INIT_WORK(&adapter->reset_task, igc_reset_task); 7091 7091 INIT_WORK(&adapter->watchdog_task, igc_watchdog_task); 7092 7092 7093 - hrtimer_init(&adapter->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 7094 - adapter->hrtimer.function = &igc_qbv_scheduling_timer; 7093 + hrtimer_setup(&adapter->hrtimer, &igc_qbv_scheduling_timer, CLOCK_MONOTONIC, 7094 + HRTIMER_MODE_REL); 7095 7095 7096 7096 /* Initialize link properties that are user-changeable */ 7097 7097 adapter->fc_autoneg = true;