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

octeontx2-pf: 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/a935bc6ca7933053f9e349578da4a8fb477b7c2d.1738746872.git.namcao@linutronix.de

authored by

Nam Cao and committed by
Thomas Gleixner
7b449279 e26ad10d

+1 -2
+1 -2
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
··· 545 545 spin_lock_init(&ptp->ptp_lock); 546 546 if (cn10k_ptp_errata(ptp)) { 547 547 ptp->read_ptp_tstmp = &read_ptp_tstmp_sec_nsec; 548 - hrtimer_init(&ptp->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 549 - ptp->hrtimer.function = ptp_reset_thresh; 548 + hrtimer_setup(&ptp->hrtimer, ptp_reset_thresh, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 550 549 } else { 551 550 ptp->read_ptp_tstmp = &read_ptp_tstmp_nsec; 552 551 }