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

Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/aff915511ee629b461fee98688b8e859075386ac.1738746821.git.namcao@linutronix.de
arch/arm/mach-imx/mmdc.c

index e898f7c2733efc74fd7c6d2743744f46d548256e..94e4f4a2f73fc336571a403c4ec854a6cd262aed 100644 (file)
@@ -509,9 +509,8 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b
        pmu_mmdc->mmdc_ipg_clk = mmdc_ipg_clk;
        pmu_mmdc->devtype_data = device_get_match_data(&pdev->dev);
 
-       hrtimer_init(&pmu_mmdc->hrtimer, CLOCK_MONOTONIC,
-                       HRTIMER_MODE_REL);
-       pmu_mmdc->hrtimer.function = mmdc_pmu_timer_handler;
+       hrtimer_setup(&pmu_mmdc->hrtimer, mmdc_pmu_timer_handler, CLOCK_MONOTONIC,
+                     HRTIMER_MODE_REL);
 
        cpumask_set_cpu(raw_smp_processor_id(), &pmu_mmdc->cpu);