diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2016-05-09 20:22:56 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-09 21:26:12 +0300 |
commit | a1a6a4d1f76aab009e6e0b1003b9c7bca3991e9c (patch) | |
tree | 19b16dca6438be0ab95f57eab88444ed50dcda2c /drivers/net/dsa/mv88e6131.c | |
parent | 8698fd9595c3b90a76c878159328ac6ebd923963 (diff) | |
download | linux-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.c | 16 |
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, |