Adapt to reworked netdev teardown and release
authorAdrian-Ken Rueegsegger <ken@codelabs.ch>
Thu, 16 Nov 2017 10:22:25 +0000 (11:22 +0100)
committerAdrian-Ken Rueegsegger <ken@codelabs.ch>
Thu, 16 Nov 2017 10:50:41 +0000 (11:50 +0100)
Upstream commit cf124d... changed the way netdev state is freed upon
destruction.

net.c

diff --git a/net.c b/net.c
index 3a7a848..e1654f3 100644 (file)
--- a/net.c
+++ b/net.c
@@ -223,7 +223,6 @@ static void muennet_free(struct net_device *dev)
        cleanup_reader(dev_info);
        cleanup_writer(dev_info);
        kfree(dev_info->bus_info);
-       free_netdev(dev);
 }
 
 static const struct net_device_ops muennet_device_ops = {
@@ -262,7 +261,8 @@ static void muennet_setup(struct net_device *dev)
                dev->netdev_ops = &muennet_device_ops;
 
        dev->ethtool_ops = &muennet_ethtool_ops;
-       dev->destructor  = muennet_free;
+       dev->needs_free_netdev = true;
+       dev->priv_destructor = muennet_free;
 }
 
 /**