Fixed driver unloading in e1000 for 2.6.29.
authorFlorian Pose <fp@igh-essen.com>
Wed, 23 Nov 2011 15:07:42 +0100
changeset 2162 3f90ae16e997
parent 2154 6a0296e7d1cd
child 2163 d6d49dcaf7a5
Fixed driver unloading in e1000 for 2.6.29.
devices/e1000/e1000_main-2.6.29-ethercat.c
--- a/devices/e1000/e1000_main-2.6.29-ethercat.c	Wed Nov 09 09:55:58 2011 +0100
+++ b/devices/e1000/e1000_main-2.6.29-ethercat.c	Wed Nov 23 15:07:42 2011 +0100
@@ -1315,7 +1315,12 @@
 	 * would have already happened in close and is redundant. */
 	e1000_release_hw_control(adapter);
 
-	unregister_netdev(netdev);
+	if (adapter->ecdev) {
+		ecdev_close(adapter->ecdev);
+		ecdev_withdraw(adapter->ecdev);
+	} else {
+		unregister_netdev(netdev);
+	}
 
 	if (!e1000_check_phy_reset_block(hw))
 		e1000_phy_hw_reset(hw);