diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2024-01-09 18:48:34 +0300 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2024-02-16 13:29:23 +0300 |
commit | 769da9708ae62f3c0a491b67c9514a53e5769feb (patch) | |
tree | 52a9650c880fbecb2d500ca538b31e1e21c949c6 /drivers/thunderbolt/tunnel.h | |
parent | fca0f40ac7ff1213ffc1757b9cd4d126c69d3931 (diff) | |
download | linux-769da9708ae62f3c0a491b67c9514a53e5769feb.tar.xz |
thunderbolt: Introduce tb_tunnel_direction_downstream()
This helper takes tunnel as parameter. Convert existing code to call
this where possible.
No functional changes.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/tunnel.h')
-rw-r--r-- | drivers/thunderbolt/tunnel.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/thunderbolt/tunnel.h b/drivers/thunderbolt/tunnel.h index b4cff5482112..1a27ccd08b86 100644 --- a/drivers/thunderbolt/tunnel.h +++ b/drivers/thunderbolt/tunnel.h @@ -139,6 +139,12 @@ static inline bool tb_tunnel_is_usb3(const struct tb_tunnel *tunnel) return tunnel->type == TB_TUNNEL_USB3; } +static inline bool tb_tunnel_direction_downstream(const struct tb_tunnel *tunnel) +{ + return tb_port_path_direction_downstream(tunnel->src_port, + tunnel->dst_port); +} + const char *tb_tunnel_type_name(const struct tb_tunnel *tunnel); #define __TB_TUNNEL_PRINT(level, tunnel, fmt, arg...) \ |