[PATCH 3/6] usb net: fix unregistration

Sascha Hauer s.hauer at pengutronix.de
Wed Feb 15 03:04:01 EST 2012


First call mii_unregister which is done in the drivers unbind function,
then eth_unregister. Also, remove unregister_device which is done in
eth_unregister.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/net/usb/usbnet.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 5ffd7a6..c7e3606 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -235,13 +235,11 @@ void usbnet_disconnect(struct usb_device *usbdev)
 	struct eth_device *edev = &undev->edev;
 	struct driver_info *info;
 
-	eth_unregister(edev);
-	unregister_device(&edev->dev);
-
 	info = undev->driver_info;
 	if (info->unbind)
 		info->unbind(undev);
 
+	eth_unregister(edev);
+
 	free(undev);
 }
-
-- 
1.7.9




More information about the barebox mailing list