net: dsa: Rename DSA probe function.
[deliverable/linux.git] / drivers / net / dsa / bcm_sf2.c
index 780f228765388c196398fd5f7aef6bb2ca5cd754..50caa525cda37f21fc51ecf5747f032fb76bfedb 100644 (file)
@@ -135,8 +135,17 @@ static int bcm_sf2_sw_get_sset_count(struct dsa_switch *ds)
        return BCM_SF2_STATS_SIZE;
 }
 
-static char *bcm_sf2_sw_probe(struct device *host_dev, int sw_addr)
+static char *bcm_sf2_sw_drv_probe(struct device *dsa_dev,
+                                 struct device *host_dev,
+                                 int sw_addr, void **_priv)
 {
+       struct bcm_sf2_priv *priv;
+
+       priv = devm_kzalloc(dsa_dev, sizeof(*priv), GFP_KERNEL);
+       if (!priv)
+               return NULL;
+       *_priv = priv;
+
        return "Broadcom Starfighter 2";
 }
 
@@ -1362,8 +1371,7 @@ static int bcm_sf2_sw_set_wol(struct dsa_switch *ds, int port,
 
 static struct dsa_switch_driver bcm_sf2_switch_driver = {
        .tag_protocol           = DSA_TAG_PROTO_BRCM,
-       .priv_size              = sizeof(struct bcm_sf2_priv),
-       .probe                  = bcm_sf2_sw_probe,
+       .probe                  = bcm_sf2_sw_drv_probe,
        .setup                  = bcm_sf2_sw_setup,
        .set_addr               = bcm_sf2_sw_set_addr,
        .get_phy_flags          = bcm_sf2_sw_get_phy_flags,
This page took 0.027721 seconds and 5 git commands to generate.