提交 df33db0f 编写于 作者: D David S. Miller

Merge branch 'pci_set_drvdata'

Jingoo Han syas:

====================
ethernet: remove unnecessary pci_set_drvdata() part 4

Since commit 0998d063
(device-core: Ensure drvdata = NULL when no driver is bound),
the driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
====================
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
...@@ -9875,7 +9875,6 @@ static int niu_pci_init_one(struct pci_dev *pdev, ...@@ -9875,7 +9875,6 @@ static int niu_pci_init_one(struct pci_dev *pdev,
err_out_disable_pdev: err_out_disable_pdev:
pci_disable_device(pdev); pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
return err; return err;
} }
...@@ -9900,7 +9899,6 @@ static void niu_pci_remove_one(struct pci_dev *pdev) ...@@ -9900,7 +9899,6 @@ static void niu_pci_remove_one(struct pci_dev *pdev)
free_netdev(dev); free_netdev(dev);
pci_release_regions(pdev); pci_release_regions(pdev);
pci_disable_device(pdev); pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
} }
} }
......
...@@ -2806,8 +2806,6 @@ static void gem_remove_one(struct pci_dev *pdev) ...@@ -2806,8 +2806,6 @@ static void gem_remove_one(struct pci_dev *pdev)
iounmap(gp->regs); iounmap(gp->regs);
pci_release_regions(pdev); pci_release_regions(pdev);
free_netdev(dev); free_netdev(dev);
pci_set_drvdata(pdev, NULL);
} }
} }
......
...@@ -2447,7 +2447,6 @@ static void bdx_remove(struct pci_dev *pdev) ...@@ -2447,7 +2447,6 @@ static void bdx_remove(struct pci_dev *pdev)
iounmap(nic->regs); iounmap(nic->regs);
pci_release_regions(pdev); pci_release_regions(pdev);
pci_disable_device(pdev); pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
vfree(nic); vfree(nic);
RET(); RET();
......
...@@ -319,7 +319,6 @@ static void tlan_remove_one(struct pci_dev *pdev) ...@@ -319,7 +319,6 @@ static void tlan_remove_one(struct pci_dev *pdev)
free_netdev(dev); free_netdev(dev);
pci_set_drvdata(pdev, NULL);
cancel_work_sync(&priv->tlan_tqueue); cancel_work_sync(&priv->tlan_tqueue);
} }
......
...@@ -2478,7 +2478,6 @@ spider_net_setup_pci_dev(struct pci_dev *pdev) ...@@ -2478,7 +2478,6 @@ spider_net_setup_pci_dev(struct pci_dev *pdev)
pci_release_regions(pdev); pci_release_regions(pdev);
out_disable_dev: out_disable_dev:
pci_disable_device(pdev); pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
return NULL; return NULL;
} }
......
...@@ -887,7 +887,6 @@ static void tc35815_remove_one(struct pci_dev *pdev) ...@@ -887,7 +887,6 @@ static void tc35815_remove_one(struct pci_dev *pdev)
mdiobus_free(lp->mii_bus); mdiobus_free(lp->mii_bus);
unregister_netdev(dev); unregister_netdev(dev);
free_netdev(dev); free_netdev(dev);
pci_set_drvdata(pdev, NULL);
} }
static int static int
......
...@@ -2292,7 +2292,6 @@ static void rhine_remove_one(struct pci_dev *pdev) ...@@ -2292,7 +2292,6 @@ static void rhine_remove_one(struct pci_dev *pdev)
free_netdev(dev); free_netdev(dev);
pci_disable_device(pdev); pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
} }
static void rhine_shutdown (struct pci_dev *pdev) static void rhine_shutdown (struct pci_dev *pdev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册