ALSA: hrtimer: Avoid direct access to hrtimer clockbase
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Thu, 21 Aug 2025 13:28:12 +0000 (15:28 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 9 Sep 2025 10:27:18 +0000 (12:27 +0200)
The field timer->base->get_time is a private implementation detail and
should not be accessed outside of the hrtimer core.

Switch to the equivalent helper.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/all/20250821-hrtimer-cleanup-get_time-v2-5-3ae822e5bfbd@linutronix.de
sound/core/hrtimer.c

index c364bd1..2d5f4d4 100644 (file)
@@ -44,7 +44,7 @@ static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt)
        }
 
        /* calculate the drift */
-       delta = ktime_sub(hrt->base->get_time(), hrtimer_get_expires(hrt));
+       delta = ktime_sub(hrtimer_cb_get_time(hrt), hrtimer_get_expires(hrt));
        if (delta > 0)
                ticks += ktime_divns(delta, ticks * resolution);