thunderbolt: Add helper to figure size of the ring

Add to common header a function that returns size of the ring. This can
be used in the drivers instead of rolling own version.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This commit is contained in:
Mika Westerberg 2025-11-10 13:18:06 +02:00
parent c51777370a
commit d614113c10

View File

@ -641,6 +641,11 @@ static inline size_t tb_ring_frame_size(const struct ring_frame *frame)
return TB_MAX_FRAME_SIZE;
}
static inline size_t tb_ring_size(const struct tb_ring *ring)
{
return ring->size;
}
struct tb_ring *tb_ring_alloc_tx(struct tb_nhi *nhi, int hop, int size,
unsigned int flags);
struct tb_ring *tb_ring_alloc_rx(struct tb_nhi *nhi, int hop, int size,