- 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
Unified · Split
| @@ -542,7 +542,7 @@ err_get_sync: · 541 unmodified lines | |||
| 542 | return ret; | 542 | return ret; |
| 543 | } | 543 | } |
| 544 | 544 | ||
| 545 | static int j721e_pcie_remove(struct platform_device *pdev) | 545 | static 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 | ||
| 559 | static struct platform_driver j721e_pcie_driver = { | 557 | static 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, |
| @@ -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 | ||
| 620 | static int bt1_pcie_remove(struct platform_device *pdev) | 620 | static 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 | ||
| 629 | static const struct of_device_id bt1_pcie_of_match[] = { | 627 | static 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 | ||
| 635 | static struct platform_driver bt1_pcie_driver = { | 633 | static 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, |
| @@ -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 | ||
| 424 | static int histb_pcie_remove(struct platform_device *pdev) | 424 | static 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 | ||
| 436 | static const struct of_device_id histb_pcie_of_match[] = { | 434 | static 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 | ||
| 442 | static struct platform_driver histb_pcie_platform_driver = { | 440 | static 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, |
| @@ -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 | ||
| 343 | static int intel_pcie_remove(struct platform_device *pdev) | 343 | static 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 | ||
| 354 | static int intel_pcie_suspend_noirq(struct device *dev) | 352 | static 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 | ||
| 444 | static struct platform_driver intel_pcie_driver = { | 442 | static 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, |
| @@ -786,7 +786,7 @@ err_disable_resources: · 785 unmodified lines | |||
| 786 | return ret; | 786 | return ret; |
| 787 | } | 787 | } |
| 788 | 788 | ||
| 789 | static int qcom_pcie_ep_remove(struct platform_device *pdev) | 789 | static 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 | ||
| 806 | static const struct of_device_id qcom_pcie_ep_match[] = { | 804 | static 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 | ||
| 813 | static struct platform_driver qcom_pcie_ep_driver = { | 811 | static 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, |
| @@ -2268,13 +2268,13 @@ fail: · 2267 unmodified lines | |||
| 2268 | return ret; | 2268 | return ret; |
| 2269 | } | 2269 | } |
| 2270 | 2270 | ||
| 2271 | static int tegra_pcie_dw_remove(struct platform_device *pdev) | 2271 | static 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 | ||
| 2295 | static int tegra_pcie_dw_suspend_late(struct device *dev) | 2293 | static 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 | ||
| 2484 | static struct platform_driver tegra_pcie_dw_driver = { | 2482 | static 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", |
| @@ -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 | ||
| 1930 | static int advk_pcie_remove(struct platform_device *pdev) | 1930 | static 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 | ||
| 1996 | static const struct of_device_id advk_pcie_of_match_table[] = { | 1994 | static 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 | }; |
| 2010 | module_platform_driver(advk_pcie_driver); | 2008 | module_platform_driver(advk_pcie_driver); |
| 2011 | 2009 | ||
| @@ -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 | ||
| 1652 | static int mvebu_pcie_remove(struct platform_device *pdev) | 1652 | static 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 | ||
| 1714 | static const struct of_device_id mvebu_pcie_of_match_table[] = { | 1712 | static 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 | }; |
| 1735 | module_platform_driver(mvebu_pcie_driver); | 1733 | module_platform_driver(mvebu_pcie_driver); |
| 1736 | 1734 | ||
| @@ -2680,7 +2680,7 @@ put_resources: · 2679 unmodified lines | |||
| 2680 | return err; | 2680 | return err; |
| 2681 | } | 2681 | } |
| 2682 | 2682 | ||
| 2683 | static int tegra_pcie_remove(struct platform_device *pdev) | 2683 | static 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 | ||
| 2708 | static int tegra_pcie_pm_suspend(struct device *dev) | 2706 | static 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 | }; |
| 2813 | module_platform_driver(tegra_pcie_driver); | 2811 | module_platform_driver(tegra_pcie_driver); |
| @@ -348,7 +348,7 @@ static void xgene_msi_isr(struct irq_desc *desc) · 347 unmodified lines | |||
| 348 | 348 | ||
| 349 | static enum cpuhp_state pci_xgene_online; | 349 | static enum cpuhp_state pci_xgene_online; |
| 350 | 350 | ||
| 351 | static int xgene_msi_remove(struct platform_device *pdev) | 351 | static 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 | ||
| 369 | static int xgene_msi_hwirq_alloc(unsigned int cpu) | 367 | static 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 | ||
| 527 | static int __init xgene_pcie_msi_init(void) | 525 | static int __init xgene_pcie_msi_init(void) |
| @@ -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 | ||
| 200 | static int altera_msi_remove(struct platform_device *pdev) | 200 | static 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 | ||
| 213 | static int altera_msi_probe(struct platform_device *pdev) | 212 | static 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 | ||
| 281 | static int __init altera_msi_init(void) | 280 | static int __init altera_msi_init(void) |
| @@ -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 | ||
| 809 | static int altera_pcie_remove(struct platform_device *pdev) | 809 | static 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 | ||
| 821 | static struct platform_driver altera_pcie_driver = { | 819 | static 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, |
| @@ -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 | ||
| 1399 | static int brcm_pcie_remove(struct platform_device *pdev) | 1399 | static 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 | ||
| 1411 | static const int pcie_offsets[] = { | 1409 | static const int pcie_offsets[] = { |
| @@ -1612,7 +1610,7 @@ static const struct dev_pm_ops brcm_pcie_pm_ops = { · 200 unmodified lines | |||
| 1612 | 1610 | ||
| 1613 | static struct platform_driver brcm_pcie_driver = { | 1611 | static 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, |
| @@ -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 | ||
| 302 | static int hisi_pcie_error_handler_remove(struct platform_device *pdev) | 302 | static 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 | ||
| 311 | static const struct acpi_device_id hisi_pcie_acpi_match[] = { | 309 | static 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 | }; |
| 324 | module_platform_driver(hisi_pcie_error_handler_driver); | 322 | module_platform_driver(hisi_pcie_error_handler_driver); |
| 325 | 323 | ||
| @@ -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 | ||
| 117 | static int iproc_pltfm_pcie_remove(struct platform_device *pdev) | 117 | static 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 | ||
| 124 | static void iproc_pltfm_pcie_shutdown(struct platform_device *pdev) | 124 | static 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 | }; |
| 140 | module_platform_driver(iproc_pltfm_pcie_driver); | 140 | module_platform_driver(iproc_pltfm_pcie_driver); |
| @@ -1537,7 +1537,7 @@ err_exit_phy: · 1536 unmodified lines | |||
| 1537 | } | 1537 | } |
| 1538 | EXPORT_SYMBOL(iproc_pcie_setup); | 1538 | EXPORT_SYMBOL(iproc_pcie_setup); |
| 1539 | 1539 | ||
| 1540 | int iproc_pcie_remove(struct iproc_pcie *pcie) | 1540 | void 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 | } |
| 1554 | EXPORT_SYMBOL(iproc_pcie_remove); | 1552 | EXPORT_SYMBOL(iproc_pcie_remove); |
| 1555 | 1553 | ||
| @@ -111,7 +111,7 @@ struct iproc_pcie { · 110 unmodified lines | |||
| 111 | }; | 111 | }; |
| 112 | 112 | ||
| 113 | int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res); | 113 | int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res); |
| 114 | int iproc_pcie_remove(struct iproc_pcie *pcie); | 114 | void iproc_pcie_remove(struct iproc_pcie *pcie); |
| 115 | int iproc_pcie_shutdown(struct iproc_pcie *pcie); | 115 | int iproc_pcie_shutdown(struct iproc_pcie *pcie); |
| 116 | 116 | ||
| 117 | #ifdef CONFIG_PCIE_IPROC_MSI | 117 | #ifdef CONFIG_PCIE_IPROC_MSI |
| @@ -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 | ||
| 946 | static int mtk_pcie_remove(struct platform_device *pdev) | 946 | static 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 | ||
| 962 | static void mtk_pcie_irq_save(struct mtk_gen3_pcie *pcie) | 960 | static 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 | ||
| 1070 | static struct platform_driver mtk_pcie_driver = { | 1068 | static 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, |
| @@ -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 | ||
| 1137 | static int mtk_pcie_remove(struct platform_device *pdev) | 1137 | static 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 | ||
| 1153 | static int mtk_pcie_suspend_noirq(struct device *dev) | 1151 | static int mtk_pcie_suspend_noirq(struct device *dev) |
| @@ -1239,7 +1237,7 @@ MODULE_DEVICE_TABLE(of, mtk_pcie_ids); · 85 unmodified lines | |||
| 1239 | 1237 | ||
| 1240 | static struct platform_driver mtk_pcie_driver = { | 1238 | static 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, |
| @@ -524,15 +524,13 @@ remove_resets: · 523 unmodified lines | |||
| 524 | return err; | 524 | return err; |
| 525 | } | 525 | } |
| 526 | 526 | ||
| 527 | static int mt7621_pcie_remove(struct platform_device *pdev) | 527 | static 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 | ||
| 538 | static const struct of_device_id mt7621_pcie_ids[] = { | 536 | static const struct of_device_id mt7621_pcie_ids[] = { |
| @@ -543,7 +541,7 @@ MODULE_DEVICE_TABLE(of, mt7621_pcie_ids); · 4 unmodified lines | |||
| 543 | 541 | ||
| 544 | static struct platform_driver mt7621_pcie_driver = { | 542 | static 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, |
| @@ -1009,7 +1009,7 @@ err_set_vpcie: · 1008 unmodified lines | |||
| 1009 | return err; | 1009 | return err; |
| 1010 | } | 1010 | } |
| 1011 | 1011 | ||
| 1012 | static int rockchip_pcie_remove(struct platform_device *pdev) | 1012 | static 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 | ||
| 1036 | static const struct dev_pm_ops rockchip_pcie_pm_ops = { | 1034 | static 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 | }; |
| 1056 | module_platform_driver(rockchip_pcie_driver); | 1054 | module_platform_driver(rockchip_pcie_driver); |
| 1057 | 1055 | ||