]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mac802154: Switch to use hrtimer_setup()
authorNam Cao <namcao@linutronix.de>
Wed, 5 Feb 2025 10:43:23 +0000 (11:43 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 18 Feb 2025 09:35:44 +0000 (10:35 +0100)
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
net/mac802154/main.c

index 21b7c3b280b457f791af937eb078bb06144aded3..ea1efef3572ae793028cff532d3bd4de2606b53c 100644 (file)
@@ -213,8 +213,8 @@ int ieee802154_register_hw(struct ieee802154_hw *hw)
                goto out_wq;
        }
 
-       hrtimer_init(&local->ifs_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
-       local->ifs_timer.function = ieee802154_xmit_ifs_timer;
+       hrtimer_setup(&local->ifs_timer, ieee802154_xmit_ifs_timer, CLOCK_MONOTONIC,
+                     HRTIMER_MODE_REL);
 
        wpan_phy_set_dev(local->phy, local->hw.parent);