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
This commit is contained in:
Bjorn Helgaas
2023-06-26 13:00:00 -05:00
21 changed files with 43 additions and 80 deletions

View File

@@ -542,7 +542,7 @@ err_get_sync:
return ret; return ret;
} }
static int j721e_pcie_remove(struct platform_device *pdev) static void j721e_pcie_remove(struct platform_device *pdev)
{ {
struct j721e_pcie *pcie = platform_get_drvdata(pdev); struct j721e_pcie *pcie = platform_get_drvdata(pdev);
struct cdns_pcie *cdns_pcie = pcie->cdns_pcie; struct cdns_pcie *cdns_pcie = pcie->cdns_pcie;
@@ -552,13 +552,11 @@ static int j721e_pcie_remove(struct platform_device *pdev)
cdns_pcie_disable_phy(cdns_pcie); cdns_pcie_disable_phy(cdns_pcie);
pm_runtime_put(dev); pm_runtime_put(dev);
pm_runtime_disable(dev); pm_runtime_disable(dev);
return 0;
} }
static struct platform_driver j721e_pcie_driver = { static struct platform_driver j721e_pcie_driver = {
.probe = j721e_pcie_probe, .probe = j721e_pcie_probe,
.remove = j721e_pcie_remove, .remove_new = j721e_pcie_remove,
.driver = { .driver = {
.name = "j721e-pcie", .name = "j721e-pcie",
.of_match_table = of_j721e_pcie_match, .of_match_table = of_j721e_pcie_match,

View File

@@ -617,13 +617,11 @@ static int bt1_pcie_probe(struct platform_device *pdev)
return bt1_pcie_add_port(btpci); return bt1_pcie_add_port(btpci);
} }
static int bt1_pcie_remove(struct platform_device *pdev) static void bt1_pcie_remove(struct platform_device *pdev)
{ {
struct bt1_pcie *btpci = platform_get_drvdata(pdev); struct bt1_pcie *btpci = platform_get_drvdata(pdev);
bt1_pcie_del_port(btpci); bt1_pcie_del_port(btpci);
return 0;
} }
static const struct of_device_id bt1_pcie_of_match[] = { static const struct of_device_id bt1_pcie_of_match[] = {
@@ -634,7 +632,7 @@ MODULE_DEVICE_TABLE(of, bt1_pcie_of_match);
static struct platform_driver bt1_pcie_driver = { static struct platform_driver bt1_pcie_driver = {
.probe = bt1_pcie_probe, .probe = bt1_pcie_probe,
.remove = bt1_pcie_remove, .remove_new = bt1_pcie_remove,
.driver = { .driver = {
.name = "bt1-pcie", .name = "bt1-pcie",
.of_match_table = bt1_pcie_of_match, .of_match_table = bt1_pcie_of_match,

View File

@@ -421,7 +421,7 @@ static int histb_pcie_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int histb_pcie_remove(struct platform_device *pdev) static void histb_pcie_remove(struct platform_device *pdev)
{ {
struct histb_pcie *hipcie = platform_get_drvdata(pdev); struct histb_pcie *hipcie = platform_get_drvdata(pdev);
@@ -429,8 +429,6 @@ static int histb_pcie_remove(struct platform_device *pdev)
if (hipcie->phy) if (hipcie->phy)
phy_exit(hipcie->phy); phy_exit(hipcie->phy);
return 0;
} }
static const struct of_device_id histb_pcie_of_match[] = { static const struct of_device_id histb_pcie_of_match[] = {
@@ -441,7 +439,7 @@ MODULE_DEVICE_TABLE(of, histb_pcie_of_match);
static struct platform_driver histb_pcie_platform_driver = { static struct platform_driver histb_pcie_platform_driver = {
.probe = histb_pcie_probe, .probe = histb_pcie_probe,
.remove = histb_pcie_remove, .remove_new = histb_pcie_remove,
.driver = { .driver = {
.name = "histb-pcie", .name = "histb-pcie",
.of_match_table = histb_pcie_of_match, .of_match_table = histb_pcie_of_match,

View File

@@ -340,15 +340,13 @@ static void __intel_pcie_remove(struct intel_pcie *pcie)
phy_exit(pcie->phy); phy_exit(pcie->phy);
} }
static int intel_pcie_remove(struct platform_device *pdev) static void intel_pcie_remove(struct platform_device *pdev)
{ {
struct intel_pcie *pcie = platform_get_drvdata(pdev); struct intel_pcie *pcie = platform_get_drvdata(pdev);
struct dw_pcie_rp *pp = &pcie->pci.pp; struct dw_pcie_rp *pp = &pcie->pci.pp;
dw_pcie_host_deinit(pp); dw_pcie_host_deinit(pp);
__intel_pcie_remove(pcie); __intel_pcie_remove(pcie);
return 0;
} }
static int intel_pcie_suspend_noirq(struct device *dev) static int intel_pcie_suspend_noirq(struct device *dev)
@@ -443,7 +441,7 @@ static const struct of_device_id of_intel_pcie_match[] = {
static struct platform_driver intel_pcie_driver = { static struct platform_driver intel_pcie_driver = {
.probe = intel_pcie_probe, .probe = intel_pcie_probe,
.remove = intel_pcie_remove, .remove_new = intel_pcie_remove,
.driver = { .driver = {
.name = "intel-gw-pcie", .name = "intel-gw-pcie",
.of_match_table = of_intel_pcie_match, .of_match_table = of_intel_pcie_match,

View File

@@ -786,7 +786,7 @@ err_disable_resources:
return ret; return ret;
} }
static int qcom_pcie_ep_remove(struct platform_device *pdev) static void qcom_pcie_ep_remove(struct platform_device *pdev)
{ {
struct qcom_pcie_ep *pcie_ep = platform_get_drvdata(pdev); struct qcom_pcie_ep *pcie_ep = platform_get_drvdata(pdev);
@@ -796,11 +796,9 @@ static int qcom_pcie_ep_remove(struct platform_device *pdev)
debugfs_remove_recursive(pcie_ep->debugfs); debugfs_remove_recursive(pcie_ep->debugfs);
if (pcie_ep->link_status == QCOM_PCIE_EP_LINK_DISABLED) if (pcie_ep->link_status == QCOM_PCIE_EP_LINK_DISABLED)
return 0; return;
qcom_pcie_disable_resources(pcie_ep); qcom_pcie_disable_resources(pcie_ep);
return 0;
} }
static const struct of_device_id qcom_pcie_ep_match[] = { static const struct of_device_id qcom_pcie_ep_match[] = {
@@ -812,7 +810,7 @@ MODULE_DEVICE_TABLE(of, qcom_pcie_ep_match);
static struct platform_driver qcom_pcie_ep_driver = { static struct platform_driver qcom_pcie_ep_driver = {
.probe = qcom_pcie_ep_probe, .probe = qcom_pcie_ep_probe,
.remove = qcom_pcie_ep_remove, .remove_new = qcom_pcie_ep_remove,
.driver = { .driver = {
.name = "qcom-pcie-ep", .name = "qcom-pcie-ep",
.of_match_table = qcom_pcie_ep_match, .of_match_table = qcom_pcie_ep_match,

View File

@@ -2268,13 +2268,13 @@ fail:
return ret; return ret;
} }
static int tegra_pcie_dw_remove(struct platform_device *pdev) static void tegra_pcie_dw_remove(struct platform_device *pdev)
{ {
struct tegra_pcie_dw *pcie = platform_get_drvdata(pdev); struct tegra_pcie_dw *pcie = platform_get_drvdata(pdev);
if (pcie->of_data->mode == DW_PCIE_RC_TYPE) { if (pcie->of_data->mode == DW_PCIE_RC_TYPE) {
if (!pcie->link_state) if (!pcie->link_state)
return 0; return;
debugfs_remove_recursive(pcie->debugfs); debugfs_remove_recursive(pcie->debugfs);
tegra_pcie_deinit_controller(pcie); tegra_pcie_deinit_controller(pcie);
@@ -2288,8 +2288,6 @@ static int tegra_pcie_dw_remove(struct platform_device *pdev)
tegra_bpmp_put(pcie->bpmp); tegra_bpmp_put(pcie->bpmp);
if (pcie->pex_refclk_sel_gpiod) if (pcie->pex_refclk_sel_gpiod)
gpiod_set_value(pcie->pex_refclk_sel_gpiod, 0); gpiod_set_value(pcie->pex_refclk_sel_gpiod, 0);
return 0;
} }
static int tegra_pcie_dw_suspend_late(struct device *dev) 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 = {
static struct platform_driver tegra_pcie_dw_driver = { static struct platform_driver tegra_pcie_dw_driver = {
.probe = tegra_pcie_dw_probe, .probe = tegra_pcie_dw_probe,
.remove = tegra_pcie_dw_remove, .remove_new = tegra_pcie_dw_remove,
.shutdown = tegra_pcie_dw_shutdown, .shutdown = tegra_pcie_dw_shutdown,
.driver = { .driver = {
.name = "tegra194-pcie", .name = "tegra194-pcie",

View File

@@ -1927,7 +1927,7 @@ static int advk_pcie_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int advk_pcie_remove(struct platform_device *pdev) static void advk_pcie_remove(struct platform_device *pdev)
{ {
struct advk_pcie *pcie = platform_get_drvdata(pdev); struct advk_pcie *pcie = platform_get_drvdata(pdev);
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie); struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
@@ -1989,8 +1989,6 @@ static int advk_pcie_remove(struct platform_device *pdev)
/* Disable phy */ /* Disable phy */
advk_pcie_disable_phy(pcie); advk_pcie_disable_phy(pcie);
return 0;
} }
static const struct of_device_id advk_pcie_of_match_table[] = { static const struct of_device_id advk_pcie_of_match_table[] = {
@@ -2005,7 +2003,7 @@ static struct platform_driver advk_pcie_driver = {
.of_match_table = advk_pcie_of_match_table, .of_match_table = advk_pcie_of_match_table,
}, },
.probe = advk_pcie_probe, .probe = advk_pcie_probe,
.remove = advk_pcie_remove, .remove_new = advk_pcie_remove,
}; };
module_platform_driver(advk_pcie_driver); module_platform_driver(advk_pcie_driver);

View File

@@ -1649,7 +1649,7 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
return pci_host_probe(bridge); return pci_host_probe(bridge);
} }
static int mvebu_pcie_remove(struct platform_device *pdev) static void mvebu_pcie_remove(struct platform_device *pdev)
{ {
struct mvebu_pcie *pcie = platform_get_drvdata(pdev); struct mvebu_pcie *pcie = platform_get_drvdata(pdev);
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie); struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
@@ -1707,8 +1707,6 @@ static int mvebu_pcie_remove(struct platform_device *pdev)
/* Power down card and disable clocks. Must be the last step. */ /* Power down card and disable clocks. Must be the last step. */
mvebu_pcie_powerdown(port); mvebu_pcie_powerdown(port);
} }
return 0;
} }
static const struct of_device_id mvebu_pcie_of_match_table[] = { static const struct of_device_id mvebu_pcie_of_match_table[] = {
@@ -1730,7 +1728,7 @@ static struct platform_driver mvebu_pcie_driver = {
.pm = &mvebu_pcie_pm_ops, .pm = &mvebu_pcie_pm_ops,
}, },
.probe = mvebu_pcie_probe, .probe = mvebu_pcie_probe,
.remove = mvebu_pcie_remove, .remove_new = mvebu_pcie_remove,
}; };
module_platform_driver(mvebu_pcie_driver); module_platform_driver(mvebu_pcie_driver);

View File

@@ -2680,7 +2680,7 @@ put_resources:
return err; return err;
} }
static int tegra_pcie_remove(struct platform_device *pdev) static void tegra_pcie_remove(struct platform_device *pdev)
{ {
struct tegra_pcie *pcie = platform_get_drvdata(pdev); struct tegra_pcie *pcie = platform_get_drvdata(pdev);
struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie); struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
@@ -2701,8 +2701,6 @@ static int tegra_pcie_remove(struct platform_device *pdev)
list_for_each_entry_safe(port, tmp, &pcie->ports, list) list_for_each_entry_safe(port, tmp, &pcie->ports, list)
tegra_pcie_port_free(port); tegra_pcie_port_free(port);
return 0;
} }
static int tegra_pcie_pm_suspend(struct device *dev) static int tegra_pcie_pm_suspend(struct device *dev)
@@ -2808,6 +2806,6 @@ static struct platform_driver tegra_pcie_driver = {
.pm = &tegra_pcie_pm_ops, .pm = &tegra_pcie_pm_ops,
}, },
.probe = tegra_pcie_probe, .probe = tegra_pcie_probe,
.remove = tegra_pcie_remove, .remove_new = tegra_pcie_remove,
}; };
module_platform_driver(tegra_pcie_driver); module_platform_driver(tegra_pcie_driver);

View File

@@ -348,7 +348,7 @@ static void xgene_msi_isr(struct irq_desc *desc)
static enum cpuhp_state pci_xgene_online; static enum cpuhp_state pci_xgene_online;
static int xgene_msi_remove(struct platform_device *pdev) static void xgene_msi_remove(struct platform_device *pdev)
{ {
struct xgene_msi *msi = platform_get_drvdata(pdev); struct xgene_msi *msi = platform_get_drvdata(pdev);
@@ -362,8 +362,6 @@ static int xgene_msi_remove(struct platform_device *pdev)
msi->bitmap = NULL; msi->bitmap = NULL;
xgene_free_domains(msi); xgene_free_domains(msi);
return 0;
} }
static int xgene_msi_hwirq_alloc(unsigned int cpu) static int xgene_msi_hwirq_alloc(unsigned int cpu)
@@ -521,7 +519,7 @@ static struct platform_driver xgene_msi_driver = {
.of_match_table = xgene_msi_match_table, .of_match_table = xgene_msi_match_table,
}, },
.probe = xgene_msi_probe, .probe = xgene_msi_probe,
.remove = xgene_msi_remove, .remove_new = xgene_msi_remove,
}; };
static int __init xgene_pcie_msi_init(void) static int __init xgene_pcie_msi_init(void)

View File

@@ -197,7 +197,7 @@ static void altera_free_domains(struct altera_msi *msi)
irq_domain_remove(msi->inner_domain); irq_domain_remove(msi->inner_domain);
} }
static int altera_msi_remove(struct platform_device *pdev) static void altera_msi_remove(struct platform_device *pdev)
{ {
struct altera_msi *msi = platform_get_drvdata(pdev); struct altera_msi *msi = platform_get_drvdata(pdev);
@@ -207,7 +207,6 @@ static int altera_msi_remove(struct platform_device *pdev)
altera_free_domains(msi); altera_free_domains(msi);
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
return 0;
} }
static int altera_msi_probe(struct platform_device *pdev) static int altera_msi_probe(struct platform_device *pdev)
@@ -275,7 +274,7 @@ static struct platform_driver altera_msi_driver = {
.of_match_table = altera_msi_of_match, .of_match_table = altera_msi_of_match,
}, },
.probe = altera_msi_probe, .probe = altera_msi_probe,
.remove = altera_msi_remove, .remove_new = altera_msi_remove,
}; };
static int __init altera_msi_init(void) static int __init altera_msi_init(void)

View File

@@ -806,7 +806,7 @@ static int altera_pcie_probe(struct platform_device *pdev)
return pci_host_probe(bridge); return pci_host_probe(bridge);
} }
static int altera_pcie_remove(struct platform_device *pdev) static void altera_pcie_remove(struct platform_device *pdev)
{ {
struct altera_pcie *pcie = platform_get_drvdata(pdev); struct altera_pcie *pcie = platform_get_drvdata(pdev);
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie); struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
@@ -814,13 +814,11 @@ static int altera_pcie_remove(struct platform_device *pdev)
pci_stop_root_bus(bridge->bus); pci_stop_root_bus(bridge->bus);
pci_remove_root_bus(bridge->bus); pci_remove_root_bus(bridge->bus);
altera_pcie_irq_teardown(pcie); altera_pcie_irq_teardown(pcie);
return 0;
} }
static struct platform_driver altera_pcie_driver = { static struct platform_driver altera_pcie_driver = {
.probe = altera_pcie_probe, .probe = altera_pcie_probe,
.remove = altera_pcie_remove, .remove_new = altera_pcie_remove,
.driver = { .driver = {
.name = "altera-pcie", .name = "altera-pcie",
.of_match_table = altera_pcie_of_match, .of_match_table = altera_pcie_of_match,

View File

@@ -1396,7 +1396,7 @@ static void __brcm_pcie_remove(struct brcm_pcie *pcie)
clk_disable_unprepare(pcie->clk); clk_disable_unprepare(pcie->clk);
} }
static int brcm_pcie_remove(struct platform_device *pdev) static void brcm_pcie_remove(struct platform_device *pdev)
{ {
struct brcm_pcie *pcie = platform_get_drvdata(pdev); struct brcm_pcie *pcie = platform_get_drvdata(pdev);
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie); struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
@@ -1404,8 +1404,6 @@ static int brcm_pcie_remove(struct platform_device *pdev)
pci_stop_root_bus(bridge->bus); pci_stop_root_bus(bridge->bus);
pci_remove_root_bus(bridge->bus); pci_remove_root_bus(bridge->bus);
__brcm_pcie_remove(pcie); __brcm_pcie_remove(pcie);
return 0;
} }
static const int pcie_offsets[] = { static const int pcie_offsets[] = {
@@ -1612,7 +1610,7 @@ static const struct dev_pm_ops brcm_pcie_pm_ops = {
static struct platform_driver brcm_pcie_driver = { static struct platform_driver brcm_pcie_driver = {
.probe = brcm_pcie_probe, .probe = brcm_pcie_probe,
.remove = brcm_pcie_remove, .remove_new = brcm_pcie_remove,
.driver = { .driver = {
.name = "brcm-pcie", .name = "brcm-pcie",
.of_match_table = brcm_pcie_match, .of_match_table = brcm_pcie_match,

View File

@@ -299,13 +299,11 @@ static int hisi_pcie_error_handler_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int hisi_pcie_error_handler_remove(struct platform_device *pdev) static void hisi_pcie_error_handler_remove(struct platform_device *pdev)
{ {
struct hisi_pcie_error_private *priv = platform_get_drvdata(pdev); struct hisi_pcie_error_private *priv = platform_get_drvdata(pdev);
ghes_unregister_vendor_record_notifier(&priv->nb); ghes_unregister_vendor_record_notifier(&priv->nb);
return 0;
} }
static const struct acpi_device_id hisi_pcie_acpi_match[] = { static const struct acpi_device_id hisi_pcie_acpi_match[] = {
@@ -319,7 +317,7 @@ static struct platform_driver hisi_pcie_error_handler_driver = {
.acpi_match_table = hisi_pcie_acpi_match, .acpi_match_table = hisi_pcie_acpi_match,
}, },
.probe = hisi_pcie_error_handler_probe, .probe = hisi_pcie_error_handler_probe,
.remove = hisi_pcie_error_handler_remove, .remove_new = hisi_pcie_error_handler_remove,
}; };
module_platform_driver(hisi_pcie_error_handler_driver); module_platform_driver(hisi_pcie_error_handler_driver);

View File

@@ -114,11 +114,11 @@ static int iproc_pltfm_pcie_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int iproc_pltfm_pcie_remove(struct platform_device *pdev) static void iproc_pltfm_pcie_remove(struct platform_device *pdev)
{ {
struct iproc_pcie *pcie = platform_get_drvdata(pdev); struct iproc_pcie *pcie = platform_get_drvdata(pdev);
return iproc_pcie_remove(pcie); iproc_pcie_remove(pcie);
} }
static void iproc_pltfm_pcie_shutdown(struct platform_device *pdev) static void iproc_pltfm_pcie_shutdown(struct platform_device *pdev)
@@ -134,7 +134,7 @@ static struct platform_driver iproc_pltfm_pcie_driver = {
.of_match_table = of_match_ptr(iproc_pcie_of_match_table), .of_match_table = of_match_ptr(iproc_pcie_of_match_table),
}, },
.probe = iproc_pltfm_pcie_probe, .probe = iproc_pltfm_pcie_probe,
.remove = iproc_pltfm_pcie_remove, .remove_new = iproc_pltfm_pcie_remove,
.shutdown = iproc_pltfm_pcie_shutdown, .shutdown = iproc_pltfm_pcie_shutdown,
}; };
module_platform_driver(iproc_pltfm_pcie_driver); module_platform_driver(iproc_pltfm_pcie_driver);

View File

@@ -1537,7 +1537,7 @@ err_exit_phy:
} }
EXPORT_SYMBOL(iproc_pcie_setup); EXPORT_SYMBOL(iproc_pcie_setup);
int iproc_pcie_remove(struct iproc_pcie *pcie) void iproc_pcie_remove(struct iproc_pcie *pcie)
{ {
struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie); struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
@@ -1548,8 +1548,6 @@ int iproc_pcie_remove(struct iproc_pcie *pcie)
phy_power_off(pcie->phy); phy_power_off(pcie->phy);
phy_exit(pcie->phy); phy_exit(pcie->phy);
return 0;
} }
EXPORT_SYMBOL(iproc_pcie_remove); EXPORT_SYMBOL(iproc_pcie_remove);

View File

@@ -111,7 +111,7 @@ struct iproc_pcie {
}; };
int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res); int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res);
int iproc_pcie_remove(struct iproc_pcie *pcie); void iproc_pcie_remove(struct iproc_pcie *pcie);
int iproc_pcie_shutdown(struct iproc_pcie *pcie); int iproc_pcie_shutdown(struct iproc_pcie *pcie);
#ifdef CONFIG_PCIE_IPROC_MSI #ifdef CONFIG_PCIE_IPROC_MSI

View File

@@ -943,7 +943,7 @@ static int mtk_pcie_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int mtk_pcie_remove(struct platform_device *pdev) static void mtk_pcie_remove(struct platform_device *pdev)
{ {
struct mtk_gen3_pcie *pcie = platform_get_drvdata(pdev); struct mtk_gen3_pcie *pcie = platform_get_drvdata(pdev);
struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie); struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
@@ -955,8 +955,6 @@ static int mtk_pcie_remove(struct platform_device *pdev)
mtk_pcie_irq_teardown(pcie); mtk_pcie_irq_teardown(pcie);
mtk_pcie_power_down(pcie); mtk_pcie_power_down(pcie);
return 0;
} }
static void mtk_pcie_irq_save(struct mtk_gen3_pcie *pcie) static void mtk_pcie_irq_save(struct mtk_gen3_pcie *pcie)
@@ -1069,7 +1067,7 @@ MODULE_DEVICE_TABLE(of, mtk_pcie_of_match);
static struct platform_driver mtk_pcie_driver = { static struct platform_driver mtk_pcie_driver = {
.probe = mtk_pcie_probe, .probe = mtk_pcie_probe,
.remove = mtk_pcie_remove, .remove_new = mtk_pcie_remove,
.driver = { .driver = {
.name = "mtk-pcie-gen3", .name = "mtk-pcie-gen3",
.of_match_table = mtk_pcie_of_match, .of_match_table = mtk_pcie_of_match,

View File

@@ -1134,7 +1134,7 @@ static void mtk_pcie_free_resources(struct mtk_pcie *pcie)
pci_free_resource_list(windows); pci_free_resource_list(windows);
} }
static int mtk_pcie_remove(struct platform_device *pdev) static void mtk_pcie_remove(struct platform_device *pdev)
{ {
struct mtk_pcie *pcie = platform_get_drvdata(pdev); struct mtk_pcie *pcie = platform_get_drvdata(pdev);
struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie); struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
@@ -1146,8 +1146,6 @@ static int mtk_pcie_remove(struct platform_device *pdev)
mtk_pcie_irq_teardown(pcie); mtk_pcie_irq_teardown(pcie);
mtk_pcie_put_resources(pcie); mtk_pcie_put_resources(pcie);
return 0;
} }
static int mtk_pcie_suspend_noirq(struct device *dev) static int mtk_pcie_suspend_noirq(struct device *dev)
@@ -1239,7 +1237,7 @@ MODULE_DEVICE_TABLE(of, mtk_pcie_ids);
static struct platform_driver mtk_pcie_driver = { static struct platform_driver mtk_pcie_driver = {
.probe = mtk_pcie_probe, .probe = mtk_pcie_probe,
.remove = mtk_pcie_remove, .remove_new = mtk_pcie_remove,
.driver = { .driver = {
.name = "mtk-pcie", .name = "mtk-pcie",
.of_match_table = mtk_pcie_ids, .of_match_table = mtk_pcie_ids,

View File

@@ -524,15 +524,13 @@ remove_resets:
return err; return err;
} }
static int mt7621_pcie_remove(struct platform_device *pdev) static void mt7621_pcie_remove(struct platform_device *pdev)
{ {
struct mt7621_pcie *pcie = platform_get_drvdata(pdev); struct mt7621_pcie *pcie = platform_get_drvdata(pdev);
struct mt7621_pcie_port *port; struct mt7621_pcie_port *port;
list_for_each_entry(port, &pcie->ports, list) list_for_each_entry(port, &pcie->ports, list)
reset_control_put(port->pcie_rst); reset_control_put(port->pcie_rst);
return 0;
} }
static const struct of_device_id mt7621_pcie_ids[] = { static const struct of_device_id mt7621_pcie_ids[] = {
@@ -543,7 +541,7 @@ MODULE_DEVICE_TABLE(of, mt7621_pcie_ids);
static struct platform_driver mt7621_pcie_driver = { static struct platform_driver mt7621_pcie_driver = {
.probe = mt7621_pcie_probe, .probe = mt7621_pcie_probe,
.remove = mt7621_pcie_remove, .remove_new = mt7621_pcie_remove,
.driver = { .driver = {
.name = "mt7621-pci", .name = "mt7621-pci",
.of_match_table = mt7621_pcie_ids, .of_match_table = mt7621_pcie_ids,

View File

@@ -1009,7 +1009,7 @@ err_set_vpcie:
return err; return err;
} }
static int rockchip_pcie_remove(struct platform_device *pdev) static void rockchip_pcie_remove(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct rockchip_pcie *rockchip = dev_get_drvdata(dev); struct rockchip_pcie *rockchip = dev_get_drvdata(dev);
@@ -1029,8 +1029,6 @@ static int rockchip_pcie_remove(struct platform_device *pdev)
regulator_disable(rockchip->vpcie3v3); regulator_disable(rockchip->vpcie3v3);
regulator_disable(rockchip->vpcie1v8); regulator_disable(rockchip->vpcie1v8);
regulator_disable(rockchip->vpcie0v9); regulator_disable(rockchip->vpcie0v9);
return 0;
} }
static const struct dev_pm_ops rockchip_pcie_pm_ops = { static const struct dev_pm_ops rockchip_pcie_pm_ops = {
@@ -1051,7 +1049,7 @@ static struct platform_driver rockchip_pcie_driver = {
.pm = &rockchip_pcie_pm_ops, .pm = &rockchip_pcie_pm_ops,
}, },
.probe = rockchip_pcie_probe, .probe = rockchip_pcie_probe,
.remove = rockchip_pcie_remove, .remove_new = rockchip_pcie_remove,
}; };
module_platform_driver(rockchip_pcie_driver); module_platform_driver(rockchip_pcie_driver);