From: varkabhadram@gmail.com
To: netdev@vger.kernel.org
Cc: Thomas.Lendacky@amd.com, geert+renesas@linux-m68k.org,
ebiederm@xmission.com, macro@linux-mips.org,
linux-kernel@vger.kernel.org, davem@davemloft.net,
Varka Bhadram <varkab@cdac.in>
Subject: [PATCH net-next v2 1/6] ethernet: amd: move amd111e_remove_one after probe
Date: Mon, 14 Jul 2014 11:55:42 +0530 [thread overview]
Message-ID: <1405319147-5212-2-git-send-email-varkabhadram@gmail.com> (raw)
In-Reply-To: <1405319147-5212-1-git-send-email-varkabhadram@gmail.com>
From: Varka Bhadram <varkab@cdac.in>
This patch moves the remove functionalities after the probe
so that we can see the registered and released resources properly.
Every driver follows the same concept.
Signed-off-by: Varka Bhadram <varkab@cdac.in>
---
drivers/net/ethernet/amd/amd8111e.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c
index 068dc7c..ddd09e8 100644
--- a/drivers/net/ethernet/amd/amd8111e.c
+++ b/drivers/net/ethernet/amd/amd8111e.c
@@ -1701,18 +1701,6 @@ static int amd8111e_resume(struct pci_dev *pci_dev)
return 0;
}
-
-static void amd8111e_remove_one(struct pci_dev *pdev)
-{
- struct net_device *dev = pci_get_drvdata(pdev);
- if (dev) {
- unregister_netdev(dev);
- iounmap(((struct amd8111e_priv *)netdev_priv(dev))->mmio);
- free_netdev(dev);
- pci_release_regions(pdev);
- pci_disable_device(pdev);
- }
-}
static void amd8111e_config_ipg(struct net_device* dev)
{
struct amd8111e_priv *lp = netdev_priv(dev);
@@ -1970,6 +1958,19 @@ err_disable_pdev:
}
+static void amd8111e_remove_one(struct pci_dev *pdev)
+{
+ struct net_device *dev = pci_get_drvdata(pdev);
+
+ if (dev) {
+ unregister_netdev(dev);
+ iounmap(((struct amd8111e_priv *)netdev_priv(dev))->mmio);
+ free_netdev(dev);
+ pci_release_regions(pdev);
+ pci_disable_device(pdev);
+ }
+}
+
static struct pci_driver amd8111e_driver = {
.name = MODULE_NAME,
.id_table = amd8111e_pci_tbl,
--
1.7.9.5
next prev parent reply other threads:[~2014-07-14 6:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 6:25 [PATCH net-next v2 0/6] cleanup for AMD811E ethernet driver varkabhadram
2014-07-14 6:25 ` varkabhadram [this message]
2014-07-14 6:25 ` [PATCH net-next v2 2/6] ethernet: amd: use devm_ioremap() varkabhadram
2014-07-14 6:25 ` [PATCH net-next v2 3/6] ethernet: amd: dynamic debug fixes varkabhadram
2014-07-14 8:06 ` Joe Perches
2014-07-14 8:21 ` Varka Bhadram
2014-07-14 6:25 ` [PATCH net-next v2 4/6] ethernet: amd: fix comment styles varkabhadram
2014-07-14 6:25 ` [PATCH net-next v2 5/6] ethernet: amd: fix pci device ids varkabhadram
2014-07-14 17:36 ` Sergei Shtylyov
2014-07-14 6:25 ` [PATCH net-next v2 6/6] ethernet: amd: fix 'foo* bar' varkabhadram
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=1405319147-5212-2-git-send-email-varkabhadram@gmail.com \
--to=varkabhadram@gmail.com \
--cc=Thomas.Lendacky@amd.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=geert+renesas@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=netdev@vger.kernel.org \
--cc=varkab@cdac.in \
/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).