diff options
author | Andrew Lunn <andrew@lunn.ch> | 2015-05-05 19:09:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-09 16:05:52 -0400 |
commit | dbde9e6667166f17d6d70a08becb05c596cb8fb5 (patch) | |
tree | 9dd6035e591b5aab8f32278db6555104dd8035dc /drivers/net/dsa/mv88e6352.c | |
parent | 54d792f257c65aaff7ac2ab5ea5f83b14c910778 (diff) |
net: dsa: Centralize setting up ports
Now that setting up a port is identical for all switches, centralisers
the code looping over all the ports to set them up.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6352.c')
-rw-r--r-- | drivers/net/dsa/mv88e6352.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/dsa/mv88e6352.c b/drivers/net/dsa/mv88e6352.c index b32ec3e9bd6d..41d113749878 100644 --- a/drivers/net/dsa/mv88e6352.c +++ b/drivers/net/dsa/mv88e6352.c | |||
@@ -136,7 +136,6 @@ static int mv88e6352_setup(struct dsa_switch *ds) | |||
136 | { | 136 | { |
137 | struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); | 137 | struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); |
138 | int ret; | 138 | int ret; |
139 | int i; | ||
140 | 139 | ||
141 | ret = mv88e6xxx_setup_common(ds); | 140 | ret = mv88e6xxx_setup_common(ds); |
142 | if (ret < 0) | 141 | if (ret < 0) |
@@ -154,13 +153,7 @@ static int mv88e6352_setup(struct dsa_switch *ds) | |||
154 | if (ret < 0) | 153 | if (ret < 0) |
155 | return ret; | 154 | return ret; |
156 | 155 | ||
157 | for (i = 0; i < ps->num_ports; i++) { | 156 | return mv88e6xxx_setup_ports(ds); |
158 | ret = mv88e6xxx_setup_port(ds, i); | ||
159 | if (ret < 0) | ||
160 | return ret; | ||
161 | } | ||
162 | |||
163 | return 0; | ||
164 | } | 157 | } |
165 | 158 | ||
166 | static int mv88e6352_read_eeprom_word(struct dsa_switch *ds, int addr) | 159 | static int mv88e6352_read_eeprom_word(struct dsa_switch *ds, int addr) |