aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/bcm_sf2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/dsa/bcm_sf2.c')
-rw-r--r--drivers/net/dsa/bcm_sf2.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index 18a79579141f..7d62802a66d5 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -136,8 +136,15 @@ static int bcm_sf2_sw_get_sset_count(struct dsa_switch *ds)
136} 136}
137 137
138static char *bcm_sf2_sw_probe(struct device *dsa_dev, struct device *host_dev, 138static char *bcm_sf2_sw_probe(struct device *dsa_dev, struct device *host_dev,
139 int sw_addr) 139 int sw_addr, void **_priv)
140{ 140{
141 struct bcm_sf2_priv *priv;
142
143 priv = devm_kzalloc(dsa_dev, sizeof(*priv), GFP_KERNEL);
144 if (!priv)
145 return NULL;
146 *_priv = priv;
147
141 return "Broadcom Starfighter 2"; 148 return "Broadcom Starfighter 2";
142} 149}
143 150
@@ -1363,7 +1370,6 @@ static int bcm_sf2_sw_set_wol(struct dsa_switch *ds, int port,
1363 1370
1364static struct dsa_switch_driver bcm_sf2_switch_driver = { 1371static struct dsa_switch_driver bcm_sf2_switch_driver = {
1365 .tag_protocol = DSA_TAG_PROTO_BRCM, 1372 .tag_protocol = DSA_TAG_PROTO_BRCM,
1366 .priv_size = sizeof(struct bcm_sf2_priv),
1367 .probe = bcm_sf2_sw_probe, 1373 .probe = bcm_sf2_sw_probe,
1368 .setup = bcm_sf2_sw_setup, 1374 .setup = bcm_sf2_sw_setup,
1369 .set_addr = bcm_sf2_sw_set_addr, 1375 .set_addr = bcm_sf2_sw_set_addr,