net: dsa: mv88e6xxx: factorize GLOBAL_CONTROL_2 setup
[cascardo/linux.git] / drivers / net / dsa / mv88e6123.c
index 5df06d8..8f3a7c5 100644 (file)
@@ -51,17 +51,6 @@ static const char *mv88e6123_drv_probe(struct device *dsa_dev,
                                   ARRAY_SIZE(mv88e6123_table));
 }
 
-static int mv88e6123_setup_global(struct dsa_switch *ds)
-{
-       struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
-
-       /* Disable remote management for now, and set the switch's
-        * DSA device number.
-        */
-       return mv88e6xxx_reg_write(ps, REG_GLOBAL, GLOBAL_CONTROL_2,
-                                  ds->index & 0x1f);
-}
-
 static int mv88e6123_setup(struct dsa_switch *ds)
 {
        struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
@@ -73,10 +62,6 @@ static int mv88e6123_setup(struct dsa_switch *ds)
        if (ret < 0)
                return ret;
 
-       ret = mv88e6123_setup_global(ds);
-       if (ret < 0)
-               return ret;
-
        return mv88e6xxx_setup_ports(ds);
 }