Commit c437dcb1 authored by Mika Westerberg's avatar Mika Westerberg

thunderbolt: Fix a couple of style issues in TMU code

Drop extra empty line and get rid of the '__' in function names. No
functional changes.
Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent 17fb1a3d
...@@ -395,7 +395,6 @@ int tb_switch_tmu_disable(struct tb_switch *sw) ...@@ -395,7 +395,6 @@ int tb_switch_tmu_disable(struct tb_switch *sw)
if (sw->tmu.rate == TB_SWITCH_TMU_RATE_OFF) if (sw->tmu.rate == TB_SWITCH_TMU_RATE_OFF)
return 0; return 0;
if (tb_route(sw)) { if (tb_route(sw)) {
bool unidirectional = sw->tmu.unidirectional; bool unidirectional = sw->tmu.unidirectional;
struct tb_port *down, *up; struct tb_port *down, *up;
...@@ -439,7 +438,7 @@ int tb_switch_tmu_disable(struct tb_switch *sw) ...@@ -439,7 +438,7 @@ int tb_switch_tmu_disable(struct tb_switch *sw)
return 0; return 0;
} }
static void __tb_switch_tmu_off(struct tb_switch *sw, bool unidirectional) static void tb_switch_tmu_off(struct tb_switch *sw, bool unidirectional)
{ {
struct tb_port *down, *up; struct tb_port *down, *up;
...@@ -469,7 +468,7 @@ static void __tb_switch_tmu_off(struct tb_switch *sw, bool unidirectional) ...@@ -469,7 +468,7 @@ static void __tb_switch_tmu_off(struct tb_switch *sw, bool unidirectional)
* This function is called when the previous TMU mode was * This function is called when the previous TMU mode was
* TB_SWITCH_TMU_RATE_OFF. * TB_SWITCH_TMU_RATE_OFF.
*/ */
static int __tb_switch_tmu_enable_bidirectional(struct tb_switch *sw) static int tb_switch_tmu_enable_bidirectional(struct tb_switch *sw)
{ {
struct tb_port *up, *down; struct tb_port *up, *down;
int ret; int ret;
...@@ -500,7 +499,7 @@ static int __tb_switch_tmu_enable_bidirectional(struct tb_switch *sw) ...@@ -500,7 +499,7 @@ static int __tb_switch_tmu_enable_bidirectional(struct tb_switch *sw)
return 0; return 0;
out: out:
__tb_switch_tmu_off(sw, false); tb_switch_tmu_off(sw, false);
return ret; return ret;
} }
...@@ -533,7 +532,7 @@ static int tb_switch_tmu_unidirectional_enable(struct tb_switch *sw) ...@@ -533,7 +532,7 @@ static int tb_switch_tmu_unidirectional_enable(struct tb_switch *sw)
* This function is called when the previous TMU mode was * This function is called when the previous TMU mode was
* TB_SWITCH_TMU_RATE_OFF. * TB_SWITCH_TMU_RATE_OFF.
*/ */
static int __tb_switch_tmu_enable_unidirectional(struct tb_switch *sw) static int tb_switch_tmu_enable_unidirectional(struct tb_switch *sw)
{ {
struct tb_port *up, *down; struct tb_port *up, *down;
int ret; int ret;
...@@ -568,11 +567,11 @@ static int __tb_switch_tmu_enable_unidirectional(struct tb_switch *sw) ...@@ -568,11 +567,11 @@ static int __tb_switch_tmu_enable_unidirectional(struct tb_switch *sw)
return 0; return 0;
out: out:
__tb_switch_tmu_off(sw, true); tb_switch_tmu_off(sw, true);
return ret; return ret;
} }
static void __tb_switch_tmu_change_mode_prev(struct tb_switch *sw) static void tb_switch_tmu_change_mode_prev(struct tb_switch *sw)
{ {
struct tb_port *down, *up; struct tb_port *down, *up;
...@@ -594,7 +593,7 @@ static void __tb_switch_tmu_change_mode_prev(struct tb_switch *sw) ...@@ -594,7 +593,7 @@ static void __tb_switch_tmu_change_mode_prev(struct tb_switch *sw)
tb_port_tmu_set_unidirectional(up, sw->tmu.unidirectional); tb_port_tmu_set_unidirectional(up, sw->tmu.unidirectional);
} }
static int __tb_switch_tmu_change_mode(struct tb_switch *sw) static int tb_switch_tmu_change_mode(struct tb_switch *sw)
{ {
struct tb_port *up, *down; struct tb_port *up, *down;
int ret; int ret;
...@@ -632,7 +631,7 @@ static int __tb_switch_tmu_change_mode(struct tb_switch *sw) ...@@ -632,7 +631,7 @@ static int __tb_switch_tmu_change_mode(struct tb_switch *sw)
return 0; return 0;
out: out:
__tb_switch_tmu_change_mode_prev(sw); tb_switch_tmu_change_mode_prev(sw);
return ret; return ret;
} }
...@@ -695,13 +694,13 @@ int tb_switch_tmu_enable(struct tb_switch *sw) ...@@ -695,13 +694,13 @@ int tb_switch_tmu_enable(struct tb_switch *sw)
*/ */
if (sw->tmu.rate == TB_SWITCH_TMU_RATE_OFF) { if (sw->tmu.rate == TB_SWITCH_TMU_RATE_OFF) {
if (unidirectional) if (unidirectional)
ret = __tb_switch_tmu_enable_unidirectional(sw); ret = tb_switch_tmu_enable_unidirectional(sw);
else else
ret = __tb_switch_tmu_enable_bidirectional(sw); ret = tb_switch_tmu_enable_bidirectional(sw);
if (ret) if (ret)
return ret; return ret;
} else if (sw->tmu.rate == TB_SWITCH_TMU_RATE_NORMAL) { } else if (sw->tmu.rate == TB_SWITCH_TMU_RATE_NORMAL) {
ret = __tb_switch_tmu_change_mode(sw); ret = tb_switch_tmu_change_mode(sw);
if (ret) if (ret)
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment