]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/ap_bus: Switch to use hrtimer_setup()
authorNam Cao <namcao@linutronix.de>
Wed, 5 Feb 2025 10:38:56 +0000 (11:38 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 18 Feb 2025 09:32:32 +0000 (10:32 +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/d8a3919c09caa671e64d9f9bbf726aa8a885a844.1738746821.git.namcao@linutronix.de
drivers/s390/crypto/ap_bus.c

index 26e1ea1940ecb5a88f98dce9e8eda198c0d27018..62feb2c639d56af42055989ddcf0ea6666d3d622 100644 (file)
@@ -2326,8 +2326,7 @@ static inline int __init ap_async_init(void)
         */
        if (MACHINE_IS_VM)
                poll_high_timeout = 1500000;
-       hrtimer_init(&ap_poll_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
-       ap_poll_timer.function = ap_poll_timeout;
+       hrtimer_setup(&ap_poll_timer, ap_poll_timeout, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
 
        queue_work(system_long_wq, &ap_scan_bus_work);