[tip: timers/core] ALSA: hrtimer: Avoid direct access to hrtimer clockbase

From: tip-bot2 for Thomas Weißschuh
Date: Tue Sep 09 2025 - 04:57:37 EST


The following commit has been merged into the timers/core branch of tip:

Commit-ID: e9209f4056e045cbeee6493ad070c10a86f16ece
Gitweb: https://git.kernel.org/tip/e9209f4056e045cbeee6493ad070c10a86f16ece
Author: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
AuthorDate: Tue, 12 Aug 2025 08:08:13 +02:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CommitterDate: Tue, 09 Sep 2025 10:53:19 +02:00

ALSA: hrtimer: Avoid direct access to hrtimer clockbase

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@xxxxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Acked-by: Takashi Iwai <tiwai@xxxxxxx>
Link: https://lore.kernel.org/all/20250812-hrtimer-cleanup-get_time-v1-5-b962cd9d9385@xxxxxxxxxxxxx

---
sound/core/hrtimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/core/hrtimer.c b/sound/core/hrtimer.c
index c364bd1..2d5f4d4 100644
--- a/sound/core/hrtimer.c
+++ b/sound/core/hrtimer.c
@@ -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);