History

Merge branch 'pci/controller/remove-void-callbacks'

- Convert platform_device .remove() callbacks to return void instead of a mostly useless int (Uwe Kleine-König) * pci/controller/remove-void-callbacks: PCI: xgene-msi: Convert to platform remove callback returning void PCI: tegra: Convert to platform remove callback returning void PCI: rockchip-host: Convert to platform remove callback returning void PCI: mvebu: Convert to platform remove callback returning void PCI: mt7621: Convert to platform remove callback returning void PCI: mediatek-gen3: Convert to platform remove callback returning void PCI: mediatek: Convert to platform remove callback returning void PCI: iproc: Convert to platform remove callback returning void PCI: hisi-error: Convert to platform remove callback returning void PCI: dwc: Convert to platform remove callback returning void PCI: j721e: Convert to platform remove callback returning void PCI: brcmstb: Convert to platform remove callback returning void PCI: altera-msi: Convert to platform remove callback returning void PCI: altera: Convert to platform remove callback returning void PCI: aardvark: Convert to platform remove callback returning void

Bjorn Helgaas committed 3 years ago

Commit 6ecac462 parents d8c226a afbb91321 files · +43 −80Browse files

Unified · Split

21 files
  1. drivers/pci/controller/cadence/pci-j721e.c +2 −4
  2. drivers/pci/controller/dwc/pcie-bt1.c +2 −4
  3. drivers/pci/controller/dwc/pcie-histb.c +2 −4
  4. drivers/pci/controller/dwc/pcie-intel-gw.c +2 −4
  5. drivers/pci/controller/dwc/pcie-qcom-ep.c +3 −5
  6. drivers/pci/controller/dwc/pcie-tegra194.c +3 −5
  7. drivers/pci/controller/pci-aardvark.c +2 −4
  8. drivers/pci/controller/pci-mvebu.c +2 −4
  9. drivers/pci/controller/pci-tegra.c +2 −4
  10. drivers/pci/controller/pci-xgene-msi.c +2 −4
  11. drivers/pci/controller/pcie-altera-msi.c +2 −3
  12. drivers/pci/controller/pcie-altera.c +2 −4
  13. drivers/pci/controller/pcie-brcmstb.c +2 −4
  14. drivers/pci/controller/pcie-hisi-error.c +2 −4
  15. drivers/pci/controller/pcie-iproc-platform.c +3 −3
  16. drivers/pci/controller/pcie-iproc.c +1 −3
  17. drivers/pci/controller/pcie-iproc.h +1 −1
  18. drivers/pci/controller/pcie-mediatek-gen3.c +2 −4
  19. drivers/pci/controller/pcie-mediatek.c +2 −4
  20. drivers/pci/controller/pcie-mt7621.c +2 −4
  21. drivers/pci/controller/pcie-rockchip-host.c +2 −4
drivers/pci/controller/cadence/pci-j721e.c+2−4
@@ -542,7 +542,7 @@ err_get_sync: · 541 unmodified lines
542 return ret;542 return ret;
543}543}
544 544
545static int j721e_pcie_remove(struct platform_device *pdev)545static void j721e_pcie_remove(struct platform_device *pdev)
546{546{
547 struct j721e_pcie *pcie = platform_get_drvdata(pdev);547 struct j721e_pcie *pcie = platform_get_drvdata(pdev);
548 struct cdns_pcie *cdns_pcie = pcie->cdns_pcie;548 struct cdns_pcie *cdns_pcie = pcie->cdns_pcie;
@@ -552,13 +552,11 @@ static int j721e_pcie_remove(struct platform_device *pdev) · 3 unmodified lines
552 cdns_pcie_disable_phy(cdns_pcie);552 cdns_pcie_disable_phy(cdns_pcie);
553 pm_runtime_put(dev);553 pm_runtime_put(dev);
554 pm_runtime_disable(dev);554 pm_runtime_disable(dev);
555
556 return 0;
557}555}
558 556
559static struct platform_driver j721e_pcie_driver = {557static struct platform_driver j721e_pcie_driver = {
560 .probe = j721e_pcie_probe,558 .probe = j721e_pcie_probe,
561 .remove = j721e_pcie_remove,559 .remove_new = j721e_pcie_remove,
562 .driver = {560 .driver = {
563 .name = "j721e-pcie",561 .name = "j721e-pcie",
564 .of_match_table = of_j721e_pcie_match,562 .of_match_table = of_j721e_pcie_match,
drivers/pci/controller/dwc/pcie-bt1.c+2−4
@@ -617,13 +617,11 @@ static int bt1_pcie_probe(struct platform_device *pdev) · 616 unmodified lines
617 return bt1_pcie_add_port(btpci);617 return bt1_pcie_add_port(btpci);
618}618}
619 619
620static int bt1_pcie_remove(struct platform_device *pdev)620static void bt1_pcie_remove(struct platform_device *pdev)
621{621{
622 struct bt1_pcie *btpci = platform_get_drvdata(pdev);622 struct bt1_pcie *btpci = platform_get_drvdata(pdev);
623 623
624 bt1_pcie_del_port(btpci);624 bt1_pcie_del_port(btpci);
625
626 return 0;
627}625}
628 626
629static const struct of_device_id bt1_pcie_of_match[] = {627static const struct of_device_id bt1_pcie_of_match[] = {
@@ -634,7 +632,7 @@ MODULE_DEVICE_TABLE(of, bt1_pcie_of_match); · 4 unmodified lines
634 632
635static struct platform_driver bt1_pcie_driver = {633static struct platform_driver bt1_pcie_driver = {
636 .probe = bt1_pcie_probe,634 .probe = bt1_pcie_probe,
637 .remove = bt1_pcie_remove,635 .remove_new = bt1_pcie_remove,
638 .driver = {636 .driver = {
639 .name = "bt1-pcie",637 .name = "bt1-pcie",
640 .of_match_table = bt1_pcie_of_match,638 .of_match_table = bt1_pcie_of_match,
drivers/pci/controller/dwc/pcie-histb.c+2−4
@@ -421,7 +421,7 @@ static int histb_pcie_probe(struct platform_device *pdev) · 420 unmodified lines
421 return 0;421 return 0;
422}422}
423 423
424static int histb_pcie_remove(struct platform_device *pdev)424static void histb_pcie_remove(struct platform_device *pdev)
425{425{
426 struct histb_pcie *hipcie = platform_get_drvdata(pdev);426 struct histb_pcie *hipcie = platform_get_drvdata(pdev);
427 427
@@ -429,8 +429,6 @@ static int histb_pcie_remove(struct platform_device *pdev) · 1 unmodified line
429 429
430 if (hipcie->phy)430 if (hipcie->phy)
431 phy_exit(hipcie->phy);431 phy_exit(hipcie->phy);
432
433 return 0;
434}432}
435 433
436static const struct of_device_id histb_pcie_of_match[] = {434static const struct of_device_id histb_pcie_of_match[] = {
@@ -441,7 +439,7 @@ MODULE_DEVICE_TABLE(of, histb_pcie_of_match); · 4 unmodified lines
441 439
442static struct platform_driver histb_pcie_platform_driver = {440static struct platform_driver histb_pcie_platform_driver = {
443 .probe = histb_pcie_probe,441 .probe = histb_pcie_probe,
444 .remove = histb_pcie_remove,442 .remove_new = histb_pcie_remove,
445 .driver = {443 .driver = {
446 .name = "histb-pcie",444 .name = "histb-pcie",
447 .of_match_table = histb_pcie_of_match,445 .of_match_table = histb_pcie_of_match,
drivers/pci/controller/dwc/pcie-intel-gw.c+2−4
@@ -340,15 +340,13 @@ static void __intel_pcie_remove(struct intel_pcie *pcie) · 339 unmodified lines
340 phy_exit(pcie->phy);340 phy_exit(pcie->phy);
341}341}
342 342
343static int intel_pcie_remove(struct platform_device *pdev)343static void intel_pcie_remove(struct platform_device *pdev)
344{344{
345 struct intel_pcie *pcie = platform_get_drvdata(pdev);345 struct intel_pcie *pcie = platform_get_drvdata(pdev);
346 struct dw_pcie_rp *pp = &pcie->pci.pp;346 struct dw_pcie_rp *pp = &pcie->pci.pp;
347 347
348 dw_pcie_host_deinit(pp);348 dw_pcie_host_deinit(pp);
349 __intel_pcie_remove(pcie);349 __intel_pcie_remove(pcie);
350
351 return 0;
352}350}
353 351
354static int intel_pcie_suspend_noirq(struct device *dev)352static int intel_pcie_suspend_noirq(struct device *dev)
@@ -443,7 +441,7 @@ static const struct of_device_id of_intel_pcie_match[] = { · 88 unmodified lines
443 441
444static struct platform_driver intel_pcie_driver = {442static struct platform_driver intel_pcie_driver = {
445 .probe = intel_pcie_probe,443 .probe = intel_pcie_probe,
446 .remove = intel_pcie_remove,444 .remove_new = intel_pcie_remove,
447 .driver = {445 .driver = {
448 .name = "intel-gw-pcie",446 .name = "intel-gw-pcie",
449 .of_match_table = of_intel_pcie_match,447 .of_match_table = of_intel_pcie_match,
drivers/pci/controller/dwc/pcie-qcom-ep.c+3−5
@@ -786,7 +786,7 @@ err_disable_resources: · 785 unmodified lines
786 return ret;786 return ret;
787}787}
788 788
789static int qcom_pcie_ep_remove(struct platform_device *pdev)789static void qcom_pcie_ep_remove(struct platform_device *pdev)
790{790{
791 struct qcom_pcie_ep *pcie_ep = platform_get_drvdata(pdev);791 struct qcom_pcie_ep *pcie_ep = platform_get_drvdata(pdev);
792 792
@@ -796,11 +796,9 @@ static int qcom_pcie_ep_remove(struct platform_device *pdev) · 3 unmodified lines
796 debugfs_remove_recursive(pcie_ep->debugfs);796 debugfs_remove_recursive(pcie_ep->debugfs);
797 797
798 if (pcie_ep->link_status == QCOM_PCIE_EP_LINK_DISABLED)798 if (pcie_ep->link_status == QCOM_PCIE_EP_LINK_DISABLED)
799 return 0;799 return;
800 800
801 qcom_pcie_disable_resources(pcie_ep);801 qcom_pcie_disable_resources(pcie_ep);
802
803 return 0;
804}802}
805 803
806static const struct of_device_id qcom_pcie_ep_match[] = {804static const struct of_device_id qcom_pcie_ep_match[] = {
@@ -812,7 +810,7 @@ MODULE_DEVICE_TABLE(of, qcom_pcie_ep_match); · 5 unmodified lines
812 810
813static struct platform_driver qcom_pcie_ep_driver = {811static struct platform_driver qcom_pcie_ep_driver = {
814 .probe = qcom_pcie_ep_probe,812 .probe = qcom_pcie_ep_probe,
815 .remove = qcom_pcie_ep_remove,813 .remove_new = qcom_pcie_ep_remove,
816 .driver = {814 .driver = {
817 .name = "qcom-pcie-ep",815 .name = "qcom-pcie-ep",
818 .of_match_table = qcom_pcie_ep_match,816 .of_match_table = qcom_pcie_ep_match,
drivers/pci/controller/dwc/pcie-tegra194.c+3−5
@@ -2268,13 +2268,13 @@ fail: · 2267 unmodified lines
2268 return ret;2268 return ret;
2269}2269}
2270 2270
2271static int tegra_pcie_dw_remove(struct platform_device *pdev)2271static void tegra_pcie_dw_remove(struct platform_device *pdev)
2272{2272{
2273 struct tegra_pcie_dw *pcie = platform_get_drvdata(pdev);2273 struct tegra_pcie_dw *pcie = platform_get_drvdata(pdev);
2274 2274
2275 if (pcie->of_data->mode == DW_PCIE_RC_TYPE) {2275 if (pcie->of_data->mode == DW_PCIE_RC_TYPE) {
2276 if (!pcie->link_state)2276 if (!pcie->link_state)
2277 return 0;2277 return;
2278 2278
2279 debugfs_remove_recursive(pcie->debugfs);2279 debugfs_remove_recursive(pcie->debugfs);
2280 tegra_pcie_deinit_controller(pcie);2280 tegra_pcie_deinit_controller(pcie);
@@ -2288,8 +2288,6 @@ static int tegra_pcie_dw_remove(struct platform_device *pdev) · 7 unmodified lines
2288 tegra_bpmp_put(pcie->bpmp);2288 tegra_bpmp_put(pcie->bpmp);
2289 if (pcie->pex_refclk_sel_gpiod)2289 if (pcie->pex_refclk_sel_gpiod)
2290 gpiod_set_value(pcie->pex_refclk_sel_gpiod, 0);2290 gpiod_set_value(pcie->pex_refclk_sel_gpiod, 0);
2291
2292 return 0;
2293}2291}
2294 2292
2295static int tegra_pcie_dw_suspend_late(struct device *dev)2293static int tegra_pcie_dw_suspend_late(struct device *dev)
@@ -2483,7 +2481,7 @@ static const struct dev_pm_ops tegra_pcie_dw_pm_ops = { · 187 unmodified lines
2483 2481
2484static struct platform_driver tegra_pcie_dw_driver = {2482static struct platform_driver tegra_pcie_dw_driver = {
2485 .probe = tegra_pcie_dw_probe,2483 .probe = tegra_pcie_dw_probe,
2486 .remove = tegra_pcie_dw_remove,2484 .remove_new = tegra_pcie_dw_remove,
2487 .shutdown = tegra_pcie_dw_shutdown,2485 .shutdown = tegra_pcie_dw_shutdown,
2488 .driver = {2486 .driver = {
2489 .name = "tegra194-pcie",2487 .name = "tegra194-pcie",
drivers/pci/controller/pci-aardvark.c+2−4
@@ -1927,7 +1927,7 @@ static int advk_pcie_probe(struct platform_device *pdev) · 1926 unmodified lines
1927 return 0;1927 return 0;
1928}1928}
1929 1929
1930static int advk_pcie_remove(struct platform_device *pdev)1930static void advk_pcie_remove(struct platform_device *pdev)
1931{1931{
1932 struct advk_pcie *pcie = platform_get_drvdata(pdev);1932 struct advk_pcie *pcie = platform_get_drvdata(pdev);
1933 struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);1933 struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
@@ -1989,8 +1989,6 @@ static int advk_pcie_remove(struct platform_device *pdev) · 55 unmodified lines
1989 1989
1990 /* Disable phy */1990 /* Disable phy */
1991 advk_pcie_disable_phy(pcie);1991 advk_pcie_disable_phy(pcie);
1992
1993 return 0;
1994}1992}
1995 1993
1996static const struct of_device_id advk_pcie_of_match_table[] = {1994static const struct of_device_id advk_pcie_of_match_table[] = {
@@ -2005,7 +2003,7 @@ static struct platform_driver advk_pcie_driver = { · 8 unmodified lines
2005 .of_match_table = advk_pcie_of_match_table,2003 .of_match_table = advk_pcie_of_match_table,
2006 },2004 },
2007 .probe = advk_pcie_probe,2005 .probe = advk_pcie_probe,
2008 .remove = advk_pcie_remove,2006 .remove_new = advk_pcie_remove,
2009};2007};
2010module_platform_driver(advk_pcie_driver);2008module_platform_driver(advk_pcie_driver);
2011 2009
drivers/pci/controller/pci-mvebu.c+2−4
@@ -1649,7 +1649,7 @@ static int mvebu_pcie_probe(struct platform_device *pdev) · 1648 unmodified lines
1649 return pci_host_probe(bridge);1649 return pci_host_probe(bridge);
1650}1650}
1651 1651
1652static int mvebu_pcie_remove(struct platform_device *pdev)1652static void mvebu_pcie_remove(struct platform_device *pdev)
1653{1653{
1654 struct mvebu_pcie *pcie = platform_get_drvdata(pdev);1654 struct mvebu_pcie *pcie = platform_get_drvdata(pdev);
1655 struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);1655 struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
@@ -1707,8 +1707,6 @@ static int mvebu_pcie_remove(struct platform_device *pdev) · 51 unmodified lines
1707 /* Power down card and disable clocks. Must be the last step. */1707 /* Power down card and disable clocks. Must be the last step. */
1708 mvebu_pcie_powerdown(port);1708 mvebu_pcie_powerdown(port);
1709 }1709 }
1710
1711 return 0;
1712}1710}
1713 1711
1714static const struct of_device_id mvebu_pcie_of_match_table[] = {1712static const struct of_device_id mvebu_pcie_of_match_table[] = {
@@ -1730,7 +1728,7 @@ static struct platform_driver mvebu_pcie_driver = { · 15 unmodified lines
1730 .pm = &mvebu_pcie_pm_ops,1728 .pm = &mvebu_pcie_pm_ops,
1731 },1729 },
1732 .probe = mvebu_pcie_probe,1730 .probe = mvebu_pcie_probe,
1733 .remove = mvebu_pcie_remove,1731 .remove_new = mvebu_pcie_remove,
1734};1732};
1735module_platform_driver(mvebu_pcie_driver);1733module_platform_driver(mvebu_pcie_driver);
1736 1734
drivers/pci/controller/pci-tegra.c+2−4
@@ -2680,7 +2680,7 @@ put_resources: · 2679 unmodified lines
2680 return err;2680 return err;
2681}2681}
2682 2682
2683static int tegra_pcie_remove(struct platform_device *pdev)2683static void tegra_pcie_remove(struct platform_device *pdev)
2684{2684{
2685 struct tegra_pcie *pcie = platform_get_drvdata(pdev);2685 struct tegra_pcie *pcie = platform_get_drvdata(pdev);
2686 struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);2686 struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
@@ -2701,8 +2701,6 @@ static int tegra_pcie_remove(struct platform_device *pdev) · 14 unmodified lines
2701 2701
2702 list_for_each_entry_safe(port, tmp, &pcie->ports, list)2702 list_for_each_entry_safe(port, tmp, &pcie->ports, list)
2703 tegra_pcie_port_free(port);2703 tegra_pcie_port_free(port);
2704
2705 return 0;
2706}2704}
2707 2705
2708static int tegra_pcie_pm_suspend(struct device *dev)2706static int tegra_pcie_pm_suspend(struct device *dev)
@@ -2808,6 +2806,6 @@ static struct platform_driver tegra_pcie_driver = { · 99 unmodified lines
2808 .pm = &tegra_pcie_pm_ops,2806 .pm = &tegra_pcie_pm_ops,
2809 },2807 },
2810 .probe = tegra_pcie_probe,2808 .probe = tegra_pcie_probe,
2811 .remove = tegra_pcie_remove,2809 .remove_new = tegra_pcie_remove,
2812};2810};
2813module_platform_driver(tegra_pcie_driver);2811module_platform_driver(tegra_pcie_driver);
drivers/pci/controller/pci-xgene-msi.c+2−4
@@ -348,7 +348,7 @@ static void xgene_msi_isr(struct irq_desc *desc) · 347 unmodified lines
348 348
349static enum cpuhp_state pci_xgene_online;349static enum cpuhp_state pci_xgene_online;
350 350
351static int xgene_msi_remove(struct platform_device *pdev)351static void xgene_msi_remove(struct platform_device *pdev)
352{352{
353 struct xgene_msi *msi = platform_get_drvdata(pdev);353 struct xgene_msi *msi = platform_get_drvdata(pdev);
354 354
@@ -362,8 +362,6 @@ static int xgene_msi_remove(struct platform_device *pdev) · 7 unmodified lines
362 msi->bitmap = NULL;362 msi->bitmap = NULL;
363 363
364 xgene_free_domains(msi);364 xgene_free_domains(msi);
365
366 return 0;
367}365}
368 366
369static int xgene_msi_hwirq_alloc(unsigned int cpu)367static int xgene_msi_hwirq_alloc(unsigned int cpu)
@@ -521,7 +519,7 @@ static struct platform_driver xgene_msi_driver = { · 151 unmodified lines
521 .of_match_table = xgene_msi_match_table,519 .of_match_table = xgene_msi_match_table,
522 },520 },
523 .probe = xgene_msi_probe,521 .probe = xgene_msi_probe,
524 .remove = xgene_msi_remove,522 .remove_new = xgene_msi_remove,
525};523};
526 524
527static int __init xgene_pcie_msi_init(void)525static int __init xgene_pcie_msi_init(void)
drivers/pci/controller/pcie-altera-msi.c+2−3
@@ -197,7 +197,7 @@ static void altera_free_domains(struct altera_msi *msi) · 196 unmodified lines
197 irq_domain_remove(msi->inner_domain);197 irq_domain_remove(msi->inner_domain);
198}198}
199 199
200static int altera_msi_remove(struct platform_device *pdev)200static void altera_msi_remove(struct platform_device *pdev)
201{201{
202 struct altera_msi *msi = platform_get_drvdata(pdev);202 struct altera_msi *msi = platform_get_drvdata(pdev);
203 203
@@ -207,7 +207,6 @@ static int altera_msi_remove(struct platform_device *pdev) · 3 unmodified lines
207 altera_free_domains(msi);207 altera_free_domains(msi);
208 208
209 platform_set_drvdata(pdev, NULL);209 platform_set_drvdata(pdev, NULL);
210 return 0;
211}210}
212 211
213static int altera_msi_probe(struct platform_device *pdev)212static int altera_msi_probe(struct platform_device *pdev)
@@ -275,7 +274,7 @@ static struct platform_driver altera_msi_driver = { · 61 unmodified lines
275 .of_match_table = altera_msi_of_match,274 .of_match_table = altera_msi_of_match,
276 },275 },
277 .probe = altera_msi_probe,276 .probe = altera_msi_probe,
278 .remove = altera_msi_remove,277 .remove_new = altera_msi_remove,
279};278};
280 279
281static int __init altera_msi_init(void)280static int __init altera_msi_init(void)
drivers/pci/controller/pcie-altera.c+2−4
@@ -806,7 +806,7 @@ static int altera_pcie_probe(struct platform_device *pdev) · 805 unmodified lines
806 return pci_host_probe(bridge);806 return pci_host_probe(bridge);
807}807}
808 808
809static int altera_pcie_remove(struct platform_device *pdev)809static void altera_pcie_remove(struct platform_device *pdev)
810{810{
811 struct altera_pcie *pcie = platform_get_drvdata(pdev);811 struct altera_pcie *pcie = platform_get_drvdata(pdev);
812 struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);812 struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
@@ -814,13 +814,11 @@ static int altera_pcie_remove(struct platform_device *pdev) · 1 unmodified line
814 pci_stop_root_bus(bridge->bus);814 pci_stop_root_bus(bridge->bus);
815 pci_remove_root_bus(bridge->bus);815 pci_remove_root_bus(bridge->bus);
816 altera_pcie_irq_teardown(pcie);816 altera_pcie_irq_teardown(pcie);
817
818 return 0;
819}817}
820 818
821static struct platform_driver altera_pcie_driver = {819static struct platform_driver altera_pcie_driver = {
822 .probe = altera_pcie_probe,820 .probe = altera_pcie_probe,
823 .remove = altera_pcie_remove,821 .remove_new = altera_pcie_remove,
824 .driver = {822 .driver = {
825 .name = "altera-pcie",823 .name = "altera-pcie",
826 .of_match_table = altera_pcie_of_match,824 .of_match_table = altera_pcie_of_match,
drivers/pci/controller/pcie-brcmstb.c+2−4
@@ -1396,7 +1396,7 @@ static void __brcm_pcie_remove(struct brcm_pcie *pcie) · 1395 unmodified lines
1396 clk_disable_unprepare(pcie->clk);1396 clk_disable_unprepare(pcie->clk);
1397}1397}
1398 1398
1399static int brcm_pcie_remove(struct platform_device *pdev)1399static void brcm_pcie_remove(struct platform_device *pdev)
1400{1400{
1401 struct brcm_pcie *pcie = platform_get_drvdata(pdev);1401 struct brcm_pcie *pcie = platform_get_drvdata(pdev);
1402 struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);1402 struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
@@ -1404,8 +1404,6 @@ static int brcm_pcie_remove(struct platform_device *pdev) · 1 unmodified line
1404 pci_stop_root_bus(bridge->bus);1404 pci_stop_root_bus(bridge->bus);
1405 pci_remove_root_bus(bridge->bus);1405 pci_remove_root_bus(bridge->bus);
1406 __brcm_pcie_remove(pcie);1406 __brcm_pcie_remove(pcie);
1407
1408 return 0;
1409}1407}
1410 1408
1411static const int pcie_offsets[] = {1409static const int pcie_offsets[] = {
@@ -1612,7 +1610,7 @@ static const struct dev_pm_ops brcm_pcie_pm_ops = { · 200 unmodified lines
1612 1610
1613static struct platform_driver brcm_pcie_driver = {1611static struct platform_driver brcm_pcie_driver = {
1614 .probe = brcm_pcie_probe,1612 .probe = brcm_pcie_probe,
1615 .remove = brcm_pcie_remove,1613 .remove_new = brcm_pcie_remove,
1616 .driver = {1614 .driver = {
1617 .name = "brcm-pcie",1615 .name = "brcm-pcie",
1618 .of_match_table = brcm_pcie_match,1616 .of_match_table = brcm_pcie_match,
drivers/pci/controller/pcie-hisi-error.c+2−4
@@ -299,13 +299,11 @@ static int hisi_pcie_error_handler_probe(struct platform_device *pdev) · 298 unmodified lines
299 return 0;299 return 0;
300}300}
301 301
302static int hisi_pcie_error_handler_remove(struct platform_device *pdev)302static void hisi_pcie_error_handler_remove(struct platform_device *pdev)
303{303{
304 struct hisi_pcie_error_private *priv = platform_get_drvdata(pdev);304 struct hisi_pcie_error_private *priv = platform_get_drvdata(pdev);
305 305
306 ghes_unregister_vendor_record_notifier(&priv->nb);306 ghes_unregister_vendor_record_notifier(&priv->nb);
307
308 return 0;
309}307}
310 308
311static const struct acpi_device_id hisi_pcie_acpi_match[] = {309static const struct acpi_device_id hisi_pcie_acpi_match[] = {
@@ -319,7 +317,7 @@ static struct platform_driver hisi_pcie_error_handler_driver = { · 7 unmodified lines
319 .acpi_match_table = hisi_pcie_acpi_match,317 .acpi_match_table = hisi_pcie_acpi_match,
320 },318 },
321 .probe = hisi_pcie_error_handler_probe,319 .probe = hisi_pcie_error_handler_probe,
322 .remove = hisi_pcie_error_handler_remove,320 .remove_new = hisi_pcie_error_handler_remove,
323};321};
324module_platform_driver(hisi_pcie_error_handler_driver);322module_platform_driver(hisi_pcie_error_handler_driver);
325 323
drivers/pci/controller/pcie-iproc-platform.c+3−3
@@ -114,11 +114,11 @@ static int iproc_pltfm_pcie_probe(struct platform_device *pdev) · 113 unmodified lines
114 return 0;114 return 0;
115}115}
116 116
117static int iproc_pltfm_pcie_remove(struct platform_device *pdev)117static void iproc_pltfm_pcie_remove(struct platform_device *pdev)
118{118{
119 struct iproc_pcie *pcie = platform_get_drvdata(pdev);119 struct iproc_pcie *pcie = platform_get_drvdata(pdev);
120 120
121 return iproc_pcie_remove(pcie);121 iproc_pcie_remove(pcie);
122}122}
123 123
124static void iproc_pltfm_pcie_shutdown(struct platform_device *pdev)124static void iproc_pltfm_pcie_shutdown(struct platform_device *pdev)
@@ -134,7 +134,7 @@ static struct platform_driver iproc_pltfm_pcie_driver = { · 9 unmodified lines
134 .of_match_table = of_match_ptr(iproc_pcie_of_match_table),134 .of_match_table = of_match_ptr(iproc_pcie_of_match_table),
135 },135 },
136 .probe = iproc_pltfm_pcie_probe,136 .probe = iproc_pltfm_pcie_probe,
137 .remove = iproc_pltfm_pcie_remove,137 .remove_new = iproc_pltfm_pcie_remove,
138 .shutdown = iproc_pltfm_pcie_shutdown,138 .shutdown = iproc_pltfm_pcie_shutdown,
139};139};
140module_platform_driver(iproc_pltfm_pcie_driver);140module_platform_driver(iproc_pltfm_pcie_driver);
drivers/pci/controller/pcie-iproc.c+1−3
@@ -1537,7 +1537,7 @@ err_exit_phy: · 1536 unmodified lines
1537}1537}
1538EXPORT_SYMBOL(iproc_pcie_setup);1538EXPORT_SYMBOL(iproc_pcie_setup);
1539 1539
1540int iproc_pcie_remove(struct iproc_pcie *pcie)1540void iproc_pcie_remove(struct iproc_pcie *pcie)
1541{1541{
1542 struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);1542 struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
1543 1543
@@ -1548,8 +1548,6 @@ int iproc_pcie_remove(struct iproc_pcie *pcie) · 4 unmodified lines
1548 1548
1549 phy_power_off(pcie->phy);1549 phy_power_off(pcie->phy);
1550 phy_exit(pcie->phy);1550 phy_exit(pcie->phy);
1551
1552 return 0;
1553}1551}
1554EXPORT_SYMBOL(iproc_pcie_remove);1552EXPORT_SYMBOL(iproc_pcie_remove);
1555 1553
drivers/pci/controller/pcie-iproc.h+1−1
@@ -111,7 +111,7 @@ struct iproc_pcie { · 110 unmodified lines
111};111};
112 112
113int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res);113int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res);
114int iproc_pcie_remove(struct iproc_pcie *pcie);114void iproc_pcie_remove(struct iproc_pcie *pcie);
115int iproc_pcie_shutdown(struct iproc_pcie *pcie);115int iproc_pcie_shutdown(struct iproc_pcie *pcie);
116 116
117#ifdef CONFIG_PCIE_IPROC_MSI117#ifdef CONFIG_PCIE_IPROC_MSI
drivers/pci/controller/pcie-mediatek-gen3.c+2−4
@@ -943,7 +943,7 @@ static int mtk_pcie_probe(struct platform_device *pdev) · 942 unmodified lines
943 return 0;943 return 0;
944}944}
945 945
946static int mtk_pcie_remove(struct platform_device *pdev)946static void mtk_pcie_remove(struct platform_device *pdev)
947{947{
948 struct mtk_gen3_pcie *pcie = platform_get_drvdata(pdev);948 struct mtk_gen3_pcie *pcie = platform_get_drvdata(pdev);
949 struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);949 struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
@@ -955,8 +955,6 @@ static int mtk_pcie_remove(struct platform_device *pdev) · 5 unmodified lines
955 955
956 mtk_pcie_irq_teardown(pcie);956 mtk_pcie_irq_teardown(pcie);
957 mtk_pcie_power_down(pcie);957 mtk_pcie_power_down(pcie);
958
959 return 0;
960}958}
961 959
962static void mtk_pcie_irq_save(struct mtk_gen3_pcie *pcie)960static void mtk_pcie_irq_save(struct mtk_gen3_pcie *pcie)
@@ -1069,7 +1067,7 @@ MODULE_DEVICE_TABLE(of, mtk_pcie_of_match); · 106 unmodified lines
1069 1067
1070static struct platform_driver mtk_pcie_driver = {1068static struct platform_driver mtk_pcie_driver = {
1071 .probe = mtk_pcie_probe,1069 .probe = mtk_pcie_probe,
1072 .remove = mtk_pcie_remove,1070 .remove_new = mtk_pcie_remove,
1073 .driver = {1071 .driver = {
1074 .name = "mtk-pcie-gen3",1072 .name = "mtk-pcie-gen3",
1075 .of_match_table = mtk_pcie_of_match,1073 .of_match_table = mtk_pcie_of_match,
drivers/pci/controller/pcie-mediatek.c+2−4
@@ -1134,7 +1134,7 @@ static void mtk_pcie_free_resources(struct mtk_pcie *pcie) · 1133 unmodified lines
1134 pci_free_resource_list(windows);1134 pci_free_resource_list(windows);
1135}1135}
1136 1136
1137static int mtk_pcie_remove(struct platform_device *pdev)1137static void mtk_pcie_remove(struct platform_device *pdev)
1138{1138{
1139 struct mtk_pcie *pcie = platform_get_drvdata(pdev);1139 struct mtk_pcie *pcie = platform_get_drvdata(pdev);
1140 struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);1140 struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
@@ -1146,8 +1146,6 @@ static int mtk_pcie_remove(struct platform_device *pdev) · 5 unmodified lines
1146 mtk_pcie_irq_teardown(pcie);1146 mtk_pcie_irq_teardown(pcie);
1147 1147
1148 mtk_pcie_put_resources(pcie);1148 mtk_pcie_put_resources(pcie);
1149
1150 return 0;
1151}1149}
1152 1150
1153static int mtk_pcie_suspend_noirq(struct device *dev)1151static int mtk_pcie_suspend_noirq(struct device *dev)
@@ -1239,7 +1237,7 @@ MODULE_DEVICE_TABLE(of, mtk_pcie_ids); · 85 unmodified lines
1239 1237
1240static struct platform_driver mtk_pcie_driver = {1238static struct platform_driver mtk_pcie_driver = {
1241 .probe = mtk_pcie_probe,1239 .probe = mtk_pcie_probe,
1242 .remove = mtk_pcie_remove,1240 .remove_new = mtk_pcie_remove,
1243 .driver = {1241 .driver = {
1244 .name = "mtk-pcie",1242 .name = "mtk-pcie",
1245 .of_match_table = mtk_pcie_ids,1243 .of_match_table = mtk_pcie_ids,
drivers/pci/controller/pcie-mt7621.c+2−4
@@ -524,15 +524,13 @@ remove_resets: · 523 unmodified lines
524 return err;524 return err;
525}525}
526 526
527static int mt7621_pcie_remove(struct platform_device *pdev)527static void mt7621_pcie_remove(struct platform_device *pdev)
528{528{
529 struct mt7621_pcie *pcie = platform_get_drvdata(pdev);529 struct mt7621_pcie *pcie = platform_get_drvdata(pdev);
530 struct mt7621_pcie_port *port;530 struct mt7621_pcie_port *port;
531 531
532 list_for_each_entry(port, &pcie->ports, list)532 list_for_each_entry(port, &pcie->ports, list)
533 reset_control_put(port->pcie_rst);533 reset_control_put(port->pcie_rst);
534
535 return 0;
536}534}
537 535
538static const struct of_device_id mt7621_pcie_ids[] = {536static const struct of_device_id mt7621_pcie_ids[] = {
@@ -543,7 +541,7 @@ MODULE_DEVICE_TABLE(of, mt7621_pcie_ids); · 4 unmodified lines
543 541
544static struct platform_driver mt7621_pcie_driver = {542static struct platform_driver mt7621_pcie_driver = {
545 .probe = mt7621_pcie_probe,543 .probe = mt7621_pcie_probe,
546 .remove = mt7621_pcie_remove,544 .remove_new = mt7621_pcie_remove,
547 .driver = {545 .driver = {
548 .name = "mt7621-pci",546 .name = "mt7621-pci",
549 .of_match_table = mt7621_pcie_ids,547 .of_match_table = mt7621_pcie_ids,
drivers/pci/controller/pcie-rockchip-host.c+2−4
@@ -1009,7 +1009,7 @@ err_set_vpcie: · 1008 unmodified lines
1009 return err;1009 return err;
1010}1010}
1011 1011
1012static int rockchip_pcie_remove(struct platform_device *pdev)1012static void rockchip_pcie_remove(struct platform_device *pdev)
1013{1013{
1014 struct device *dev = &pdev->dev;1014 struct device *dev = &pdev->dev;
1015 struct rockchip_pcie *rockchip = dev_get_drvdata(dev);1015 struct rockchip_pcie *rockchip = dev_get_drvdata(dev);
@@ -1029,8 +1029,6 @@ static int rockchip_pcie_remove(struct platform_device *pdev) · 13 unmodified lines
1029 regulator_disable(rockchip->vpcie3v3);1029 regulator_disable(rockchip->vpcie3v3);
1030 regulator_disable(rockchip->vpcie1v8);1030 regulator_disable(rockchip->vpcie1v8);
1031 regulator_disable(rockchip->vpcie0v9);1031 regulator_disable(rockchip->vpcie0v9);
1032
1033 return 0;
1034}1032}
1035 1033
1036static const struct dev_pm_ops rockchip_pcie_pm_ops = {1034static const struct dev_pm_ops rockchip_pcie_pm_ops = {
@@ -1051,7 +1049,7 @@ static struct platform_driver rockchip_pcie_driver = { · 14 unmodified lines
1051 .pm = &rockchip_pcie_pm_ops,1049 .pm = &rockchip_pcie_pm_ops,
1052 },1050 },
1053 .probe = rockchip_pcie_probe,1051 .probe = rockchip_pcie_probe,
1054 .remove = rockchip_pcie_remove,1052 .remove_new = rockchip_pcie_remove,
1055};1053};
1056module_platform_driver(rockchip_pcie_driver);1054module_platform_driver(rockchip_pcie_driver);
1057 1055