netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wang Chen <wangchen@cn.fujitsu.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Krzysztof Halasa <khc@pm.waw.pl>,
	netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>
Subject: [PATCH] HDLC driver: use unregister_netdev instead of unregister_netdevice
Date: Wed, 12 Dec 2007 10:35:56 +0800	[thread overview]
Message-ID: <475F490C.2020305@cn.fujitsu.com> (raw)

[PATCH] HDLC driver: use unregister_netdev instead of unregister_netdevice

Since the caller and the upper caller doesn't hod the rtnl semaphore.
We should use unregister_netdev instead of unregister_netdevice.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
---
 hdlc_fr.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.24.rc5.org/drivers/net/wan/hdlc_fr.c	2007-10-10 04:31:38.000000000 +0800
+++ linux-2.6.24.rc5/drivers/net/wan/hdlc_fr.c	2007-12-12 10:25:13.000000000 +0800
@@ -1177,7 +1177,7 @@ static int fr_del_pvc(hdlc_device *hdlc,
 	if (dev->flags & IFF_UP)
 		return -EBUSY;		/* PVC in use */
 
-	unregister_netdevice(dev); /* the destructor will free_netdev(dev) */
+	unregister_netdev(dev); /* the destructor will free_netdev(dev) */
 	*get_dev_p(pvc, type) = NULL;
 
 	if (!pvc_is_used(pvc)) {
@@ -1202,10 +1202,10 @@ static void fr_destroy(struct net_device
 		pvc_device *next = pvc->next;
 		/* destructors will free_netdev() main and ether */
 		if (pvc->main)
-			unregister_netdevice(pvc->main);
+			unregister_netdev(pvc->main);
 
 		if (pvc->ether)
-			unregister_netdevice(pvc->ether);
+			unregister_netdev(pvc->ether);
 
 		kfree(pvc);
 		pvc = next;


             reply	other threads:[~2007-12-12  2:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-12  2:35 Wang Chen [this message]
2007-12-12 18:46 ` [PATCH] HDLC driver: use unregister_netdev instead of unregister_netdevice David Miller
2007-12-13  3:13   ` Herbert Xu
2007-12-13  3:22     ` David Miller
2007-12-14 21:28 ` Krzysztof Halasa
2007-12-14 21:36   ` David Miller

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=475F490C.2020305@cn.fujitsu.com \
    --to=wangchen@cn.fujitsu.com \
    --cc=davem@davemloft.net \
    --cc=jgarzik@pobox.com \
    --cc=khc@pm.waw.pl \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).