summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/mv88e6131.c
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2016-05-09 20:22:56 +0300
committerDavid S. Miller <davem@davemloft.net>2016-05-09 21:26:12 +0300
commita1a6a4d1f76aab009e6e0b1003b9c7bca3991e9c (patch)
tree19b16dca6438be0ab95f57eab88444ed50dcda2c /drivers/net/dsa/mv88e6131.c
parent8698fd9595c3b90a76c878159328ac6ebd923963 (diff)
downloadlinux-a1a6a4d1f76aab009e6e0b1003b9c7bca3991e9c.tar.xz
net: dsa: mv88e6xxx: factorize switch setup
Provide a shared mv88e6xxx_setup function to the drivers. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6131.c')
-rw-r--r--drivers/net/dsa/mv88e6131.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/net/dsa/mv88e6131.c b/drivers/net/dsa/mv88e6131.c
index da2832726672..22952be7f4de 100644
--- a/drivers/net/dsa/mv88e6131.c
+++ b/drivers/net/dsa/mv88e6131.c
@@ -58,24 +58,10 @@ static const char *mv88e6131_drv_probe(struct device *dsa_dev,
ARRAY_SIZE(mv88e6131_table));
}
-static int mv88e6131_setup(struct dsa_switch *ds)
-{
- struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
- int ret;
-
- ps->ds = ds;
-
- ret = mv88e6xxx_setup_common(ps);
- if (ret < 0)
- return ret;
-
- return mv88e6xxx_setup_ports(ds);
-}
-
struct dsa_switch_driver mv88e6131_switch_driver = {
.tag_protocol = DSA_TAG_PROTO_DSA,
.probe = mv88e6131_drv_probe,
- .setup = mv88e6131_setup,
+ .setup = mv88e6xxx_setup,
.set_addr = mv88e6xxx_set_addr,
.phy_read = mv88e6xxx_phy_read,
.phy_write = mv88e6xxx_phy_write,