mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
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:
parent
c51777370a
commit
d614113c10
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user