diff options
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index d43ab0f4192a..36ca32275b45 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -2165,24 +2165,18 @@ static int ehea_clean_all_portres(struct ehea_port *port) | |||
2165 | return ret; | 2165 | return ret; |
2166 | } | 2166 | } |
2167 | 2167 | ||
2168 | static void ehea_remove_adapter_mr (struct ehea_adapter *adapter) | 2168 | static void ehea_remove_adapter_mr(struct ehea_adapter *adapter) |
2169 | { | 2169 | { |
2170 | int i; | 2170 | if (adapter->active_ports) |
2171 | 2171 | return; | |
2172 | for (i=0; i < EHEA_MAX_PORTS; i++) | ||
2173 | if (adapter->port[i]) | ||
2174 | return; | ||
2175 | 2172 | ||
2176 | ehea_rem_mr(&adapter->mr); | 2173 | ehea_rem_mr(&adapter->mr); |
2177 | } | 2174 | } |
2178 | 2175 | ||
2179 | static int ehea_add_adapter_mr (struct ehea_adapter *adapter) | 2176 | static int ehea_add_adapter_mr(struct ehea_adapter *adapter) |
2180 | { | 2177 | { |
2181 | int i; | 2178 | if (adapter->active_ports) |
2182 | 2179 | return 0; | |
2183 | for (i=0; i < EHEA_MAX_PORTS; i++) | ||
2184 | if (adapter->port[i]) | ||
2185 | return 0; | ||
2186 | 2180 | ||
2187 | return ehea_reg_kernel_mr(adapter, &adapter->mr); | 2181 | return ehea_reg_kernel_mr(adapter, &adapter->mr); |
2188 | } | 2182 | } |