For a casual reader tb_switch_is_cr() does not tell much so instead
spell out the full controller name in the function name. For example
tb_switch_is_cr() becomes tb_switch_is_cactus_ridge() which is easier
to understand.

Signed-off-by: Mika Westerberg <mika.westerb...@linux.intel.com>
---
 drivers/thunderbolt/cap.c | 6 +++---
 drivers/thunderbolt/tb.c  | 4 ++--
 drivers/thunderbolt/tb.h  | 8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/thunderbolt/cap.c b/drivers/thunderbolt/cap.c
index 8bf8e031f0bc..fdd77bb4628d 100644
--- a/drivers/thunderbolt/cap.c
+++ b/drivers/thunderbolt/cap.c
@@ -33,9 +33,9 @@ static int tb_port_enable_tmu(struct tb_port *port, bool 
enable)
         * Legacy devices need to have TMU access enabled before port
         * space can be fully accessed.
         */
-       if (tb_switch_is_lr(sw))
+       if (tb_switch_is_light_ridge(sw))
                offset = 0x26;
-       else if (tb_switch_is_er(sw))
+       else if (tb_switch_is_eagle_ridge(sw))
                offset = 0x2a;
        else
                return 0;
@@ -60,7 +60,7 @@ static void tb_port_dummy_read(struct tb_port *port)
         * reading stale data on next read perform one dummy read after
         * port capabilities are walked.
         */
-       if (tb_switch_is_lr(port->sw)) {
+       if (tb_switch_is_light_ridge(port->sw)) {
                u32 dummy;
 
                tb_port_read(port, &dummy, TB_CFG_PORT, 0, 1);
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index f2ce6adc1f48..e8e2d20cf4c6 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -342,9 +342,9 @@ static struct tb_port *tb_find_pcie_down(struct tb_switch 
*sw,
                 * Hard-coded Thunderbolt port to PCIe down port mapping
                 * per controller.
                 */
-               if (tb_switch_is_cr(sw))
+               if (tb_switch_is_cactus_ridge(sw))
                        index = !phy_port ? 6 : 7;
-               else if (tb_switch_is_fr(sw))
+               else if (tb_switch_is_falcon_ridge(sw))
                        index = !phy_port ? 6 : 8;
                else
                        goto out;
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
index 16d529983004..a6f1fa0d4771 100644
--- a/drivers/thunderbolt/tb.h
+++ b/drivers/thunderbolt/tb.h
@@ -576,17 +576,17 @@ static inline struct tb_switch *tb_switch_parent(struct 
tb_switch *sw)
        return tb_to_switch(sw->dev.parent);
 }
 
-static inline bool tb_switch_is_lr(const struct tb_switch *sw)
+static inline bool tb_switch_is_light_ridge(const struct tb_switch *sw)
 {
        return sw->config.device_id == PCI_DEVICE_ID_INTEL_LIGHT_RIDGE;
 }
 
-static inline bool tb_switch_is_er(const struct tb_switch *sw)
+static inline bool tb_switch_is_eagle_ridge(const struct tb_switch *sw)
 {
        return sw->config.device_id == PCI_DEVICE_ID_INTEL_EAGLE_RIDGE;
 }
 
-static inline bool tb_switch_is_cr(const struct tb_switch *sw)
+static inline bool tb_switch_is_cactus_ridge(const struct tb_switch *sw)
 {
        switch (sw->config.device_id) {
        case PCI_DEVICE_ID_INTEL_CACTUS_RIDGE_2C:
@@ -597,7 +597,7 @@ static inline bool tb_switch_is_cr(const struct tb_switch 
*sw)
        }
 }
 
-static inline bool tb_switch_is_fr(const struct tb_switch *sw)
+static inline bool tb_switch_is_falcon_ridge(const struct tb_switch *sw)
 {
        switch (sw->config.device_id) {
        case PCI_DEVICE_ID_INTEL_FALCON_RIDGE_2C_BRIDGE:
-- 
2.23.0

Reply via email to