diff options
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r-- | net/dsa/dsa.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index beb79ccf0f59..22e44f691ab9 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c | |||
@@ -275,6 +275,10 @@ static int dsa_switch_setup_one(struct dsa_switch *ds, struct device *parent) | |||
275 | if (ret < 0) | 275 | if (ret < 0) |
276 | return ret; | 276 | return ret; |
277 | 277 | ||
278 | ret = dsa_switch_register_notifier(ds); | ||
279 | if (ret) | ||
280 | return ret; | ||
281 | |||
278 | if (ops->set_addr) { | 282 | if (ops->set_addr) { |
279 | ret = ops->set_addr(ds, dst->master_netdev->dev_addr); | 283 | ret = ops->set_addr(ds, dst->master_netdev->dev_addr); |
280 | if (ret < 0) | 284 | if (ret < 0) |
@@ -400,6 +404,8 @@ static void dsa_switch_destroy(struct dsa_switch *ds) | |||
400 | 404 | ||
401 | if (ds->slave_mii_bus && ds->ops->phy_read) | 405 | if (ds->slave_mii_bus && ds->ops->phy_read) |
402 | mdiobus_unregister(ds->slave_mii_bus); | 406 | mdiobus_unregister(ds->slave_mii_bus); |
407 | |||
408 | dsa_switch_unregister_notifier(ds); | ||
403 | } | 409 | } |
404 | 410 | ||
405 | #ifdef CONFIG_PM_SLEEP | 411 | #ifdef CONFIG_PM_SLEEP |