From de9d89b4086129cd575640ed111b18d43c01a5d4 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Mon, 7 Sep 2026 16:40:45 +0300 Subject: thunderbolt: Add tb_ring_poll_pending() This helper can be used to figure out whether tb_ring_poll() has a frame to be returned. This can be used without the caller needing to take its own lock. Assisted-by: LLM Signed-off-by: Mika Westerberg --- include/linux/thunderbolt.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux') diff --git a/include/linux/thunderbolt.h b/include/linux/thunderbolt.h index 335fa31ab1df..577bcf6e3810 100644 --- a/include/linux/thunderbolt.h +++ b/include/linux/thunderbolt.h @@ -754,6 +754,7 @@ static inline int tb_ring_tx_more(struct tb_ring *ring, struct ring_frame *frame /* Used only when the ring is in polling mode */ struct ring_frame *tb_ring_poll(struct tb_ring *ring); +bool tb_ring_poll_pending(struct tb_ring *ring); void tb_ring_poll_complete(struct tb_ring *ring); int tb_ring_throttling(struct tb_ring *ring, unsigned int interval_nsec); -- cgit v1.2.3