]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/thunderbolt/tb.h
thunderbolt: Move tb_switch_phy_port_from_link() to thunderbolt.h
[mirror_ubuntu-bionic-kernel.git] / drivers / thunderbolt / tb.h
index 2fefe76621ca343fe5153eabe4d8b98329f868c5..ea21d927bd094e85a4e19f7927a6743eaeb3fc5e 100644 (file)
@@ -40,8 +40,6 @@ struct tb_switch_nvm {
 };
 
 #define TB_SWITCH_KEY_SIZE             32
-/* Each physical port contains 2 links on modern controllers */
-#define TB_SWITCH_LINKS_PER_PHY_PORT   2
 
 /**
  * struct tb_switch - a thunderbolt switch
@@ -367,11 +365,6 @@ struct tb_switch *tb_switch_find_by_link_depth(struct tb *tb, u8 link,
                                               u8 depth);
 struct tb_switch *tb_switch_find_by_uuid(struct tb *tb, const uuid_t *uuid);
 
-static inline unsigned int tb_switch_phy_port_from_link(unsigned int link)
-{
-       return (link - 1) / TB_SWITCH_LINKS_PER_PHY_PORT;
-}
-
 static inline void tb_switch_put(struct tb_switch *sw)
 {
        put_device(&sw->dev);