|
@@ -903,10 +903,6 @@ static struct packet_type dsa_pack_type __read_mostly = {
|
|
|
.func = dsa_switch_rcv,
|
|
.func = dsa_switch_rcv,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-static struct notifier_block dsa_netdevice_nb __read_mostly = {
|
|
|
|
|
- .notifier_call = dsa_slave_netdevice_event,
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
#ifdef CONFIG_PM_SLEEP
|
|
#ifdef CONFIG_PM_SLEEP
|
|
|
static int dsa_suspend(struct device *d)
|
|
static int dsa_suspend(struct device *d)
|
|
|
{
|
|
{
|
|
@@ -964,7 +960,9 @@ static int __init dsa_init_module(void)
|
|
|
{
|
|
{
|
|
|
int rc;
|
|
int rc;
|
|
|
|
|
|
|
|
- register_netdevice_notifier(&dsa_netdevice_nb);
|
|
|
|
|
|
|
+ rc = dsa_slave_register_notifier();
|
|
|
|
|
+ if (rc)
|
|
|
|
|
+ return rc;
|
|
|
|
|
|
|
|
rc = platform_driver_register(&dsa_driver);
|
|
rc = platform_driver_register(&dsa_driver);
|
|
|
if (rc)
|
|
if (rc)
|
|
@@ -978,7 +976,7 @@ module_init(dsa_init_module);
|
|
|
|
|
|
|
|
static void __exit dsa_cleanup_module(void)
|
|
static void __exit dsa_cleanup_module(void)
|
|
|
{
|
|
{
|
|
|
- unregister_netdevice_notifier(&dsa_netdevice_nb);
|
|
|
|
|
|
|
+ dsa_slave_unregister_notifier();
|
|
|
dev_remove_pack(&dsa_pack_type);
|
|
dev_remove_pack(&dsa_pack_type);
|
|
|
platform_driver_unregister(&dsa_driver);
|
|
platform_driver_unregister(&dsa_driver);
|
|
|
}
|
|
}
|