mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/6] usb net: fix unregistration
Date: Wed, 15 Feb 2012 09:04:01 +0100	[thread overview]
Message-ID: <1329293044-9967-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1329293044-9967-1-git-send-email-s.hauer@pengutronix.de>

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@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-02-15  8:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-15  8:03 USB/network unregistration patches Sascha Hauer
2012-02-15  8:03 ` [PATCH 1/6] usb net smsc95xx: remove unused variable Sascha Hauer
2012-02-15  8:04 ` [PATCH 2/6] usb net smsc95xx: add missing mii_unregister Sascha Hauer
2012-02-15  8:04 ` Sascha Hauer [this message]
2012-02-15  8:04 ` [PATCH 4/6] net: fix eth device unregistration Sascha Hauer
2012-02-15  8:04 ` [PATCH 5/6] net: set enetaddr to invalid address when an invalid string is passed Sascha Hauer
2012-02-15  8:04 ` [PATCH 6/6] USB storage: fix disconnect Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1329293044-9967-4-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox