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

mac802154: 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/5a89d86092d11a1d0cdfdfaa33990aaf7f1eec87.1738746872.git.namcao@linutronix.de

authored by

Nam Cao and committed by
Thomas Gleixner
96b2fb3e efcb2d32

+2 -2
+2 -2
net/mac802154/main.c
··· 213 213 goto out_wq; 214 214 } 215 215 216 - hrtimer_init(&local->ifs_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 217 - local->ifs_timer.function = ieee802154_xmit_ifs_timer; 216 + hrtimer_setup(&local->ifs_timer, ieee802154_xmit_ifs_timer, CLOCK_MONOTONIC, 217 + HRTIMER_MODE_REL); 218 218 219 219 wpan_phy_set_dev(local->phy, local->hw.parent); 220 220