]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/core/net-sysfs.c
Merge branch 'for-linus' of git://linux-nfs.org/~bfields/linux
[linux-2.6-omap-h63xx.git] / net / core / net-sysfs.c
index b21307b15b82d7e09d34101180d9f7131bf1f418..5c19b0646d7a3e09c0284a93686c2d738fc92fd1 100644 (file)
@@ -456,9 +456,15 @@ static struct class net_class = {
 #endif
 };
 
+/* Delete sysfs entries but hold kobject reference until after all
+ * netdev references are gone.
+ */
 void netdev_unregister_sysfs(struct net_device * net)
 {
-       device_del(&(net->dev));
+       struct device *dev = &(net->dev);
+
+       kobject_get(&dev->kobj);
+       device_del(dev);
 }
 
 /* Create sysfs entries for network device. */