]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/huc: Switch to use hrtimer_setup()
authorNam Cao <namcao@linutronix.de>
Wed, 5 Feb 2025 10:46:19 +0000 (11:46 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 18 Feb 2025 10:19:05 +0000 (11:19 +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>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://lore.kernel.org/all/d293dd4dd9cb6a9bb9e99f3fc11ea174c6525bf8.1738746904.git.namcao@linutronix.de
drivers/gpu/drm/i915/gt/uc/intel_huc.c

index b3cbf85c00cbd5a52cd813be6d314f07edceb90a..00d00c480cc58322d2f5c8abc0631c5af694396e 100644 (file)
@@ -231,8 +231,8 @@ static void delayed_huc_load_init(struct intel_huc *huc)
                           sw_fence_dummy_notify);
        i915_sw_fence_commit(&huc->delayed_load.fence);
 
-       hrtimer_init(&huc->delayed_load.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
-       huc->delayed_load.timer.function = huc_delayed_load_timer_callback;
+       hrtimer_setup(&huc->delayed_load.timer, huc_delayed_load_timer_callback, CLOCK_MONOTONIC,
+                     HRTIMER_MODE_REL);
 }
 
 static void delayed_huc_load_fini(struct intel_huc *huc)