net: dsa: Rename DSA probe function.
[deliverable/linux.git] / drivers / net / dsa / mv88e6123.c
index 69a6f79dcb10c40950ae99fba09d853ba951199c..c34283d929c43e713b31173f081d92c8ce83f83f 100644 (file)
@@ -29,10 +29,13 @@ static const struct mv88e6xxx_switch_id mv88e6123_table[] = {
        { PORT_SWITCH_ID_6165_A2, "Marvell 88e6165 (A2)" },
 };
 
-static char *mv88e6123_probe(struct device *host_dev, int sw_addr)
+static char *mv88e6123_drv_probe(struct device *dsa_dev,
+                                struct device *host_dev,
+                                int sw_addr, void **priv)
 {
-       return mv88e6xxx_lookup_name(host_dev, sw_addr, mv88e6123_table,
-                                    ARRAY_SIZE(mv88e6123_table));
+       return mv88e6xxx_drv_probe(dsa_dev, host_dev, sw_addr, priv,
+                                  mv88e6123_table,
+                                  ARRAY_SIZE(mv88e6123_table));
 }
 
 static int mv88e6123_setup_global(struct dsa_switch *ds)
@@ -73,6 +76,8 @@ static int mv88e6123_setup(struct dsa_switch *ds)
        struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
        int ret;
 
+       ps->ds = ds;
+
        ret = mv88e6xxx_setup_common(ds);
        if (ret < 0)
                return ret;
@@ -102,8 +107,7 @@ static int mv88e6123_setup(struct dsa_switch *ds)
 
 struct dsa_switch_driver mv88e6123_switch_driver = {
        .tag_protocol           = DSA_TAG_PROTO_EDSA,
-       .priv_size              = sizeof(struct mv88e6xxx_priv_state),
-       .probe                  = mv88e6123_probe,
+       .probe                  = mv88e6123_drv_probe,
        .setup                  = mv88e6123_setup,
        .set_addr               = mv88e6xxx_set_addr_indirect,
        .phy_read               = mv88e6xxx_phy_read,
This page took 0.028294 seconds and 5 git commands to generate.