Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: pwm-ir-tx: 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 an equivalent higher-level 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: Sean Young <sean@mess.org>
Link: https://lore.kernel.org/all/20250821-hrtimer-cleanup-get_time-v2-6-3ae822e5bfbd@linutronix.de

authored by

Thomas Weißschuh and committed by
Thomas Gleixner
44d7fb8a 645e0644

+1 -4
+1 -4
drivers/media/rc/pwm-ir-tx.c
··· 117 117 static enum hrtimer_restart pwm_ir_timer(struct hrtimer *timer) 118 118 { 119 119 struct pwm_ir *pwm_ir = container_of(timer, struct pwm_ir, timer); 120 - ktime_t now; 121 120 122 121 /* 123 122 * If we happen to hit an odd latency spike, loop through the ··· 138 139 hrtimer_add_expires_ns(timer, ns); 139 140 140 141 pwm_ir->txbuf_index++; 141 - 142 - now = timer->base->get_time(); 143 - } while (hrtimer_get_expires_tv64(timer) < now); 142 + } while (hrtimer_expires_remaining(timer) > 0); 144 143 145 144 return HRTIMER_RESTART; 146 145 }