aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amd
diff options
context:
space:
mode:
authorVarka Bhadram <varkab@cdac.in>2014-07-14 04:39:04 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-14 22:14:15 -0400
commit43519e60ef8020e7b4f99d20b6663fab50af21dc (patch)
treee9c29f161c9538b5f9af0f5a80a0fdf195e5338f /drivers/net/ethernet/amd
parent30c9e022c520b8a01cc1b59abe480fad4436472b (diff)
ethernet: amd: move amd111e_remove_one after probe
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd')
-rw-r--r--drivers/net/ethernet/amd/amd8111e.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c
index 068dc7cad5fa..ddd09e830527 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)
1701 return 0; 1701 return 0;
1702} 1702}
1703 1703
1704
1705static void amd8111e_remove_one(struct pci_dev *pdev)
1706{
1707 struct net_device *dev = pci_get_drvdata(pdev);
1708 if (dev) {
1709 unregister_netdev(dev);
1710 iounmap(((struct amd8111e_priv *)netdev_priv(dev))->mmio);
1711 free_netdev(dev);
1712 pci_release_regions(pdev);
1713 pci_disable_device(pdev);
1714 }
1715}
1716static void amd8111e_config_ipg(struct net_device* dev) 1704static void amd8111e_config_ipg(struct net_device* dev)
1717{ 1705{
1718 struct amd8111e_priv *lp = netdev_priv(dev); 1706 struct amd8111e_priv *lp = netdev_priv(dev);
@@ -1970,6 +1958,19 @@ err_disable_pdev:
1970 1958
1971} 1959}
1972 1960
1961static void amd8111e_remove_one(struct pci_dev *pdev)
1962{
1963 struct net_device *dev = pci_get_drvdata(pdev);
1964
1965 if (dev) {
1966 unregister_netdev(dev);
1967 iounmap(((struct amd8111e_priv *)netdev_priv(dev))->mmio);
1968 free_netdev(dev);
1969 pci_release_regions(pdev);
1970 pci_disable_device(pdev);
1971 }
1972}
1973
1973static struct pci_driver amd8111e_driver = { 1974static struct pci_driver amd8111e_driver = {
1974 .name = MODULE_NAME, 1975 .name = MODULE_NAME,
1975 .id_table = amd8111e_pci_tbl, 1976 .id_table = amd8111e_pci_tbl,