PCI: controller: Switch back to struct platform_driver::remove()

After commit 0edb555a65d1 ("platform: Make platform_driver::remove() return
void") .remove() is (again) the right callback to implement for platform
drivers.

Convert all PCI controller drivers to use .remove(), with the eventual goal
to drop struct platform_driver::remove_new(). As .remove() and .remove_new()
have the same prototypes, conversion is done by just changing the structure
member name in the driver initializer.

Link: https://lore.kernel.org/r/20240923065706.728769-1-sergio.paracuellos@gmail.com
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
[bhelgaas: add pcie-xilinx-nwl.c and tidy whitespace per Uwe Kleine-König:
https://lore.kernel.org/r/tdxrmmqyzcufupnwkdbg7lwgadizm7v3lxjirykijbml7x54ze@upbdzycdsilm]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
Sergio Paracuellos 2024-09-23 08:57:06 +02:00 committed by Bjorn Helgaas
parent 9852d85ec9
commit 3c87b3c85a
26 changed files with 28 additions and 28 deletions

View File

@ -712,7 +712,7 @@ static DEFINE_NOIRQ_DEV_PM_OPS(j721e_pcie_pm_ops,
static struct platform_driver j721e_pcie_driver = { static struct platform_driver j721e_pcie_driver = {
.probe = j721e_pcie_probe, .probe = j721e_pcie_probe,
.remove_new = j721e_pcie_remove, .remove = 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

@ -383,7 +383,7 @@ static const struct of_device_id exynos_pcie_of_match[] = {
static struct platform_driver exynos_pcie_driver = { static struct platform_driver exynos_pcie_driver = {
.probe = exynos_pcie_probe, .probe = exynos_pcie_probe,
.remove_new = exynos_pcie_remove, .remove = exynos_pcie_remove,
.driver = { .driver = {
.name = "exynos-pcie", .name = "exynos-pcie",
.of_match_table = exynos_pcie_of_match, .of_match_table = exynos_pcie_of_match,

View File

@ -1363,7 +1363,7 @@ static void ks_pcie_remove(struct platform_device *pdev)
static struct platform_driver ks_pcie_driver = { static struct platform_driver ks_pcie_driver = {
.probe = ks_pcie_probe, .probe = ks_pcie_probe,
.remove_new = ks_pcie_remove, .remove = ks_pcie_remove,
.driver = { .driver = {
.name = "keystone-pcie", .name = "keystone-pcie",
.of_match_table = ks_pcie_of_match, .of_match_table = ks_pcie_of_match,

View File

@ -632,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_new = bt1_pcie_remove, .remove = 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

@ -439,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_new = histb_pcie_remove, .remove = 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

@ -443,7 +443,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_new = intel_pcie_remove, .remove = 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

@ -769,7 +769,7 @@ static int kirin_pcie_probe(struct platform_device *pdev)
static struct platform_driver kirin_pcie_driver = { static struct platform_driver kirin_pcie_driver = {
.probe = kirin_pcie_probe, .probe = kirin_pcie_probe,
.remove_new = kirin_pcie_remove, .remove = kirin_pcie_remove,
.driver = { .driver = {
.name = "kirin-pcie", .name = "kirin-pcie",
.of_match_table = kirin_pcie_match, .of_match_table = kirin_pcie_match,

View File

@ -937,7 +937,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_new = qcom_pcie_ep_remove, .remove = 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

@ -775,7 +775,7 @@ static struct platform_driver rcar_gen4_pcie_driver = {
.probe_type = PROBE_PREFER_ASYNCHRONOUS, .probe_type = PROBE_PREFER_ASYNCHRONOUS,
}, },
.probe = rcar_gen4_pcie_probe, .probe = rcar_gen4_pcie_probe,
.remove_new = rcar_gen4_pcie_remove, .remove = rcar_gen4_pcie_remove,
}; };
module_platform_driver(rcar_gen4_pcie_driver); module_platform_driver(rcar_gen4_pcie_driver);

View File

@ -2493,7 +2493,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_new = tegra_pcie_dw_remove, .remove = tegra_pcie_dw_remove,
.shutdown = tegra_pcie_dw_shutdown, .shutdown = tegra_pcie_dw_shutdown,
.driver = { .driver = {
.name = "tegra194-pcie", .name = "tegra194-pcie",

View File

@ -1996,7 +1996,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_new = advk_pcie_remove, .remove = advk_pcie_remove,
}; };
module_platform_driver(advk_pcie_driver); module_platform_driver(advk_pcie_driver);

View File

@ -82,7 +82,7 @@ static struct platform_driver gen_pci_driver = {
.of_match_table = gen_pci_of_match, .of_match_table = gen_pci_of_match,
}, },
.probe = pci_host_common_probe, .probe = pci_host_common_probe,
.remove_new = pci_host_common_remove, .remove = pci_host_common_remove,
}; };
module_platform_driver(gen_pci_driver); module_platform_driver(gen_pci_driver);

View File

@ -1727,7 +1727,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_new = mvebu_pcie_remove, .remove = mvebu_pcie_remove,
}; };
module_platform_driver(mvebu_pcie_driver); module_platform_driver(mvebu_pcie_driver);

View File

@ -2800,6 +2800,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_new = tegra_pcie_remove, .remove = tegra_pcie_remove,
}; };
module_platform_driver(tegra_pcie_driver); module_platform_driver(tegra_pcie_driver);

View File

@ -518,7 +518,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_new = xgene_msi_remove, .remove = xgene_msi_remove,
}; };
static int __init xgene_pcie_msi_init(void) static int __init xgene_pcie_msi_init(void)

View File

@ -267,7 +267,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_new = altera_msi_remove, .remove = altera_msi_remove,
}; };
static int __init altera_msi_init(void) static int __init altera_msi_init(void)

View File

@ -815,10 +815,10 @@ static void altera_pcie_remove(struct platform_device *pdev)
} }
static struct platform_driver altera_pcie_driver = { static struct platform_driver altera_pcie_driver = {
.probe = altera_pcie_probe, .probe = altera_pcie_probe,
.remove_new = altera_pcie_remove, .remove = 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

@ -1928,7 +1928,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_new = brcm_pcie_remove, .remove = 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

@ -317,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_new = hisi_pcie_error_handler_remove, .remove = hisi_pcie_error_handler_remove,
}; };
module_platform_driver(hisi_pcie_error_handler_driver); module_platform_driver(hisi_pcie_error_handler_driver);

View File

@ -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_new = iproc_pltfm_pcie_remove, .remove = 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

@ -1225,7 +1225,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_new = mtk_pcie_remove, .remove = 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

@ -1235,7 +1235,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_new = mtk_pcie_remove, .remove = 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

@ -541,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_new = mt7621_pcie_remove, .remove = 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

@ -1050,7 +1050,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_new = rockchip_pcie_remove, .remove = rockchip_pcie_remove,
}; };
module_platform_driver(rockchip_pcie_driver); module_platform_driver(rockchip_pcie_driver);

View File

@ -916,6 +916,6 @@ static struct platform_driver nwl_pcie_driver = {
.of_match_table = nwl_pcie_of_match, .of_match_table = nwl_pcie_of_match,
}, },
.probe = nwl_pcie_probe, .probe = nwl_pcie_probe,
.remove_new = nwl_pcie_remove, .remove = nwl_pcie_remove,
}; };
builtin_platform_driver(nwl_pcie_driver); builtin_platform_driver(nwl_pcie_driver);

View File

@ -480,7 +480,7 @@ static struct platform_driver starfive_pcie_driver = {
.pm = pm_sleep_ptr(&starfive_pcie_pm_ops), .pm = pm_sleep_ptr(&starfive_pcie_pm_ops),
}, },
.probe = starfive_pcie_probe, .probe = starfive_pcie_probe,
.remove_new = starfive_pcie_remove, .remove = starfive_pcie_remove,
}; };
module_platform_driver(starfive_pcie_driver); module_platform_driver(starfive_pcie_driver);