Message ID | 1a44c5fc95616d64157d2f4a55f460476d382554.1730987047.git.ukleinek@kernel.org |
---|---|
State | New |
Headers | show |
Series | memory: Switch back to struct platform_driver::remove() | expand |
On 07/11/2024 15:57, Uwe Kleine-König wrote: > After commit 0edb555a65d1 ("platform: Make platform_driver::remove() > return void") .remove() is (again) the right callback to implement for > platform drivers. > > Convert all platform drivers below drivers/memory 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. > > A few white space changes are included to make indention consistent. > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Thank you for the patch. It is too late in the cycle for me to pick it up. I will take it after the merge window. Best regards, Krzysztof
On 11/7/2024 6:57 AM, Uwe Kleine-König wrote: > After commit 0edb555a65d1 ("platform: Make platform_driver::remove() > return void") .remove() is (again) the right callback to implement for > platform drivers. > > Convert all platform drivers below drivers/memory 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. > > A few white space changes are included to make indention consistent. > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> For the brcmstb driver: Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
On 07/11/2024 16:57, Uwe Kleine-König wrote: > After commit 0edb555a65d1 ("platform: Make platform_driver::remove() > return void") .remove() is (again) the right callback to implement for > platform drivers. > > Convert all platform drivers below drivers/memory 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. > > A few white space changes are included to make indention consistent. > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> for drivers/memory/omap-gpmc.c Reviewed-by: Roger Quadros <rogerq@kernel.org>
diff --git a/drivers/memory/brcmstb_dpfe.c b/drivers/memory/brcmstb_dpfe.c index 5028467b2dc9..08d9e05b1b33 100644 --- a/drivers/memory/brcmstb_dpfe.c +++ b/drivers/memory/brcmstb_dpfe.c @@ -934,7 +934,7 @@ static struct platform_driver brcmstb_dpfe_driver = { .of_match_table = brcmstb_dpfe_of_match, }, .probe = brcmstb_dpfe_probe, - .remove_new = brcmstb_dpfe_remove, + .remove = brcmstb_dpfe_remove, .resume = brcmstb_dpfe_resume, }; diff --git a/drivers/memory/brcmstb_memc.c b/drivers/memory/brcmstb_memc.c index 4f17a93aa028..c87b37e2c1f0 100644 --- a/drivers/memory/brcmstb_memc.c +++ b/drivers/memory/brcmstb_memc.c @@ -283,7 +283,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(brcmstb_memc_pm_ops, brcmstb_memc_suspend, static struct platform_driver brcmstb_memc_driver = { .probe = brcmstb_memc_probe, - .remove_new = brcmstb_memc_remove, + .remove = brcmstb_memc_remove, .driver = { .name = "brcmstb_memc", .of_match_table = brcmstb_memc_of_match, diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index 99eb7d1baa5f..2e1ecae9e959 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -1159,7 +1159,7 @@ MODULE_DEVICE_TABLE(of, emif_of_match); static struct platform_driver emif_driver = { .probe = emif_probe, - .remove_new = emif_remove, + .remove = emif_remove, .shutdown = emif_shutdown, .driver = { .name = "emif", diff --git a/drivers/memory/fsl-corenet-cf.c b/drivers/memory/fsl-corenet-cf.c index f47d05f7c5c5..ecd6c1955153 100644 --- a/drivers/memory/fsl-corenet-cf.c +++ b/drivers/memory/fsl-corenet-cf.c @@ -249,7 +249,7 @@ static struct platform_driver ccf_driver = { .of_match_table = ccf_matches, }, .probe = ccf_probe, - .remove_new = ccf_remove, + .remove = ccf_remove, }; module_platform_driver(ccf_driver); diff --git a/drivers/memory/fsl_ifc.c b/drivers/memory/fsl_ifc.c index 15e919c24f81..27e041178c09 100644 --- a/drivers/memory/fsl_ifc.c +++ b/drivers/memory/fsl_ifc.c @@ -316,7 +316,7 @@ static struct platform_driver fsl_ifc_ctrl_driver = { .of_match_table = fsl_ifc_match, }, .probe = fsl_ifc_ctrl_probe, - .remove_new = fsl_ifc_ctrl_remove, + .remove = fsl_ifc_ctrl_remove, }; static int __init fsl_ifc_init(void) diff --git a/drivers/memory/jz4780-nemc.c b/drivers/memory/jz4780-nemc.c index fb6db2ffe71b..1a8161514d03 100644 --- a/drivers/memory/jz4780-nemc.c +++ b/drivers/memory/jz4780-nemc.c @@ -407,7 +407,7 @@ static const struct of_device_id jz4780_nemc_dt_match[] = { static struct platform_driver jz4780_nemc_driver = { .probe = jz4780_nemc_probe, - .remove_new = jz4780_nemc_remove, + .remove = jz4780_nemc_remove, .driver = { .name = "jz4780-nemc", .of_match_table = of_match_ptr(jz4780_nemc_dt_match), diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index 2bc034dff691..5710348f72f6 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -616,7 +616,7 @@ static const struct dev_pm_ops smi_larb_pm_ops = { static struct platform_driver mtk_smi_larb_driver = { .probe = mtk_smi_larb_probe, - .remove_new = mtk_smi_larb_remove, + .remove = mtk_smi_larb_remove, .driver = { .name = "mtk-smi-larb", .of_match_table = mtk_smi_larb_of_ids, @@ -838,7 +838,7 @@ static const struct dev_pm_ops smi_common_pm_ops = { static struct platform_driver mtk_smi_common_driver = { .probe = mtk_smi_common_probe, - .remove_new = mtk_smi_common_remove, + .remove = mtk_smi_common_remove, .driver = { .name = "mtk-smi-common", .of_match_table = mtk_smi_common_of_ids, diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index c8a0d82f9c27..50eb9f49512b 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -2743,7 +2743,7 @@ MODULE_DEVICE_TABLE(of, gpmc_dt_ids); static struct platform_driver gpmc_driver = { .probe = gpmc_probe, - .remove_new = gpmc_remove, + .remove = gpmc_remove, .driver = { .name = DEVICE_NAME, .of_match_table = of_match_ptr(gpmc_dt_ids), diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c index 7fbd36fa1a1b..55209ca43a96 100644 --- a/drivers/memory/renesas-rpc-if.c +++ b/drivers/memory/renesas-rpc-if.c @@ -794,10 +794,10 @@ static const struct of_device_id rpcif_of_match[] = { MODULE_DEVICE_TABLE(of, rpcif_of_match); static struct platform_driver rpcif_driver = { - .probe = rpcif_probe, - .remove_new = rpcif_remove, + .probe = rpcif_probe, + .remove = rpcif_remove, .driver = { - .name = "rpc-if", + .name = "rpc-if", .of_match_table = rpcif_of_match, }, }; diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c index 7d80322754fa..dfc5ee54a9b7 100644 --- a/drivers/memory/samsung/exynos5422-dmc.c +++ b/drivers/memory/samsung/exynos5422-dmc.c @@ -1570,10 +1570,10 @@ static const struct of_device_id exynos5_dmc_of_match[] = { MODULE_DEVICE_TABLE(of, exynos5_dmc_of_match); static struct platform_driver exynos5_dmc_platdrv = { - .probe = exynos5_dmc_probe, - .remove_new = exynos5_dmc_remove, + .probe = exynos5_dmc_probe, + .remove = exynos5_dmc_remove, .driver = { - .name = "exynos5-dmc", + .name = "exynos5-dmc", .of_match_table = exynos5_dmc_of_match, }, }; diff --git a/drivers/memory/stm32-fmc2-ebi.c b/drivers/memory/stm32-fmc2-ebi.c index 566c225f71c0..2f1e2d7d54b5 100644 --- a/drivers/memory/stm32-fmc2-ebi.c +++ b/drivers/memory/stm32-fmc2-ebi.c @@ -1814,9 +1814,9 @@ static const struct of_device_id stm32_fmc2_ebi_match[] = { MODULE_DEVICE_TABLE(of, stm32_fmc2_ebi_match); static struct platform_driver stm32_fmc2_ebi_driver = { - .probe = stm32_fmc2_ebi_probe, - .remove_new = stm32_fmc2_ebi_remove, - .driver = { + .probe = stm32_fmc2_ebi_probe, + .remove = stm32_fmc2_ebi_remove, + .driver = { .name = "stm32_fmc2_ebi", .of_match_table = stm32_fmc2_ebi_match, .pm = &stm32_fmc2_ebi_pm_ops, diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c index 33d67d251719..bc807d7fcd4e 100644 --- a/drivers/memory/tegra/tegra186-emc.c +++ b/drivers/memory/tegra/tegra186-emc.c @@ -406,7 +406,7 @@ static struct platform_driver tegra186_emc_driver = { .sync_state = icc_sync_state, }, .probe = tegra186_emc_probe, - .remove_new = tegra186_emc_remove, + .remove = tegra186_emc_remove, }; module_platform_driver(tegra186_emc_driver); diff --git a/drivers/memory/tegra/tegra210-emc-core.c b/drivers/memory/tegra/tegra210-emc-core.c index 78ca1d6c0977..2d5d8245a1d3 100644 --- a/drivers/memory/tegra/tegra210-emc-core.c +++ b/drivers/memory/tegra/tegra210-emc-core.c @@ -2051,7 +2051,7 @@ static struct platform_driver tegra210_emc_driver = { .pm = &tegra210_emc_pm_ops, }, .probe = tegra210_emc_probe, - .remove_new = tegra210_emc_remove, + .remove = tegra210_emc_remove, }; module_platform_driver(tegra210_emc_driver); diff --git a/drivers/memory/ti-emif-pm.c b/drivers/memory/ti-emif-pm.c index 592f70e9c8e5..df362ecc59e9 100644 --- a/drivers/memory/ti-emif-pm.c +++ b/drivers/memory/ti-emif-pm.c @@ -330,7 +330,7 @@ static const struct dev_pm_ops ti_emif_pm_ops = { static struct platform_driver ti_emif_driver = { .probe = ti_emif_probe, - .remove_new = ti_emif_remove, + .remove = ti_emif_remove, .driver = { .name = KBUILD_MODNAME, .of_match_table = ti_emif_of_match,
After commit 0edb555a65d1 ("platform: Make platform_driver::remove() return void") .remove() is (again) the right callback to implement for platform drivers. Convert all platform drivers below drivers/memory 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. A few white space changes are included to make indention consistent. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> --- Hello, I did a single patch for all of drivers/memory. While I usually prefer to do one logical change per patch, this seems to be overengineering here as the individual changes are really trivial and shouldn't be much in the way for stable backports. But I'll happily split the patch if you prefer it split. Also if you object the indentation stuff, I can rework that. This is based on yesterday's next, if conflicts arise when you apply it at some later time and don't want to resolve them, feel free to just drop the changes to the conflicting files. I'll notice and followup at a later time then. Or ask me for a fixed resend. (Having said that, I recommend b4 am -3 + git am -3 which should resolve most conflicts just fine.) Best regards Uwe drivers/memory/brcmstb_dpfe.c | 2 +- drivers/memory/brcmstb_memc.c | 2 +- drivers/memory/emif.c | 2 +- drivers/memory/fsl-corenet-cf.c | 2 +- drivers/memory/fsl_ifc.c | 2 +- drivers/memory/jz4780-nemc.c | 2 +- drivers/memory/mtk-smi.c | 4 ++-- drivers/memory/omap-gpmc.c | 2 +- drivers/memory/renesas-rpc-if.c | 6 +++--- drivers/memory/samsung/exynos5422-dmc.c | 6 +++--- drivers/memory/stm32-fmc2-ebi.c | 6 +++--- drivers/memory/tegra/tegra186-emc.c | 2 +- drivers/memory/tegra/tegra210-emc-core.c | 2 +- drivers/memory/ti-emif-pm.c | 2 +- 14 files changed, 21 insertions(+), 21 deletions(-) base-commit: 5b913f5d7d7fe0f567dea8605f21da6eaa1735fb