Skip to content

Commit 44d7fb8

Browse files
t-8chKAGA-KOKO
authored andcommitted
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
1 parent 645e064 commit 44d7fb8

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/media/rc/pwm-ir-tx.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ static int pwm_ir_tx_atomic(struct rc_dev *dev, unsigned int *txbuf,
117117
static enum hrtimer_restart pwm_ir_timer(struct hrtimer *timer)
118118
{
119119
struct pwm_ir *pwm_ir = container_of(timer, struct pwm_ir, timer);
120-
ktime_t now;
121120

122121
/*
123122
* If we happen to hit an odd latency spike, loop through the
@@ -139,9 +138,7 @@ static enum hrtimer_restart pwm_ir_timer(struct hrtimer *timer)
139138
hrtimer_add_expires_ns(timer, ns);
140139

141140
pwm_ir->txbuf_index++;
142-
143-
now = timer->base->get_time();
144-
} while (hrtimer_get_expires_tv64(timer) < now);
141+
} while (hrtimer_expires_remaining(timer) > 0);
145142

146143
return HRTIMER_RESTART;
147144
}

0 commit comments

Comments
 (0)