Commit 4d822032 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'platform-remove-void-soc-for-6.7-rc' of...

Merge tag 'platform-remove-void-soc-for-6.7-rc' of https://git.pengutronix.de/git/ukl/linux into soc/drivers

Convert drivers/soc to struct platform_driver::remove_new()

This PR contains the patches I sent in the series available at
https://lore.kernel.org/all/20230925095532.1984344-1-u.kleine-koenig@pengutronix.de
that were not yet picked up in next as of next-20231013.

It converts all drivers below drivers/soc to let their remove callback
return void. See commit 5c5a7680 ("platform: Provide a remove
callback that returns no value") for the rationale.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 55fa358c e77e6e3e
......@@ -300,12 +300,10 @@ static int dpaa2_console_probe(struct platform_device *pdev)
return error;
}
static int dpaa2_console_remove(struct platform_device *pdev)
static void dpaa2_console_remove(struct platform_device *pdev)
{
misc_deregister(&dpaa2_mc_console_dev);
misc_deregister(&dpaa2_aiop_console_dev);
return 0;
}
static const struct of_device_id dpaa2_console_match_table[] = {
......@@ -322,7 +320,7 @@ static struct platform_driver dpaa2_console_driver = {
.of_match_table = dpaa2_console_match_table,
},
.probe = dpaa2_console_probe,
.remove = dpaa2_console_remove,
.remove_new = dpaa2_console_remove,
};
module_platform_driver(dpaa2_console_driver);
......
......@@ -1415,7 +1415,7 @@ static int qmc_probe(struct platform_device *pdev)
return ret;
}
static int qmc_remove(struct platform_device *pdev)
static void qmc_remove(struct platform_device *pdev)
{
struct qmc *qmc = platform_get_drvdata(pdev);
......@@ -1427,8 +1427,6 @@ static int qmc_remove(struct platform_device *pdev)
/* Disconnect the serial from TSA */
tsa_serial_disconnect(qmc->tsa_serial);
return 0;
}
static const struct of_device_id qmc_id_table[] = {
......@@ -1443,7 +1441,7 @@ static struct platform_driver qmc_driver = {
.of_match_table = of_match_ptr(qmc_id_table),
},
.probe = qmc_probe,
.remove = qmc_remove,
.remove_new = qmc_remove,
};
module_platform_driver(qmc_driver);
......
......@@ -706,7 +706,7 @@ static int tsa_probe(struct platform_device *pdev)
return 0;
}
static int tsa_remove(struct platform_device *pdev)
static void tsa_remove(struct platform_device *pdev)
{
struct tsa *tsa = platform_get_drvdata(pdev);
int i;
......@@ -729,7 +729,6 @@ static int tsa_remove(struct platform_device *pdev)
clk_put(tsa->tdm[i].l1rclk_clk);
}
}
return 0;
}
static const struct of_device_id tsa_id_table[] = {
......@@ -744,7 +743,7 @@ static struct platform_driver tsa_driver = {
.of_match_table = of_match_ptr(tsa_id_table),
},
.probe = tsa_probe,
.remove = tsa_remove,
.remove_new = tsa_remove,
};
module_platform_driver(tsa_driver);
......
......@@ -116,7 +116,7 @@ static int a64fx_diag_probe(struct platform_device *pdev)
return 0;
}
static int a64fx_diag_remove(struct platform_device *pdev)
static void a64fx_diag_remove(struct platform_device *pdev)
{
struct a64fx_diag_priv *priv = platform_get_drvdata(pdev);
......@@ -127,8 +127,6 @@ static int a64fx_diag_remove(struct platform_device *pdev)
free_nmi(priv->irq, NULL);
else
free_irq(priv->irq, NULL);
return 0;
}
static const struct acpi_device_id a64fx_diag_acpi_match[] = {
......@@ -144,7 +142,7 @@ static struct platform_driver a64fx_diag_driver = {
.acpi_match_table = ACPI_PTR(a64fx_diag_acpi_match),
},
.probe = a64fx_diag_probe,
.remove = a64fx_diag_remove,
.remove_new = a64fx_diag_remove,
};
module_platform_driver(a64fx_diag_driver);
......
......@@ -1244,14 +1244,12 @@ static int hccs_probe(struct platform_device *pdev)
return rc;
}
static int hccs_remove(struct platform_device *pdev)
static void hccs_remove(struct platform_device *pdev)
{
struct hccs_dev *hdev = platform_get_drvdata(pdev);
hccs_remove_topo_dirs(hdev);
hccs_unregister_pcc_channel(hdev);
return 0;
}
static const struct acpi_device_id hccs_acpi_match[] = {
......@@ -1262,7 +1260,7 @@ MODULE_DEVICE_TABLE(acpi, hccs_acpi_match);
static struct platform_driver hccs_driver = {
.probe = hccs_probe,
.remove = hccs_remove,
.remove_new = hccs_remove,
.driver = {
.name = "kunpeng_hccs",
.acpi_match_table = hccs_acpi_match,
......
......@@ -736,7 +736,7 @@ static int ixp4xx_npe_probe(struct platform_device *pdev)
return 0;
}
static int ixp4xx_npe_remove(struct platform_device *pdev)
static void ixp4xx_npe_remove(struct platform_device *pdev)
{
int i;
......@@ -744,8 +744,6 @@ static int ixp4xx_npe_remove(struct platform_device *pdev)
if (npe_tab[i].regs) {
npe_reset(&npe_tab[i]);
}
return 0;
}
static const struct of_device_id ixp4xx_npe_of_match[] = {
......@@ -761,7 +759,7 @@ static struct platform_driver ixp4xx_npe_driver = {
.of_match_table = ixp4xx_npe_of_match,
},
.probe = ixp4xx_npe_probe,
.remove = ixp4xx_npe_remove,
.remove_new = ixp4xx_npe_remove,
};
module_platform_driver(ixp4xx_npe_driver);
......
......@@ -442,11 +442,10 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev)
return 0;
}
static int ixp4xx_qmgr_remove(struct platform_device *pdev)
static void ixp4xx_qmgr_remove(struct platform_device *pdev)
{
synchronize_irq(qmgr_irq_1);
synchronize_irq(qmgr_irq_2);
return 0;
}
static const struct of_device_id ixp4xx_qmgr_of_match[] = {
......@@ -462,7 +461,7 @@ static struct platform_driver ixp4xx_qmgr_driver = {
.of_match_table = ixp4xx_qmgr_of_match,
},
.probe = ixp4xx_qmgr_probe,
.remove = ixp4xx_qmgr_remove,
.remove_new = ixp4xx_qmgr_remove,
};
module_platform_driver(ixp4xx_qmgr_driver);
......
......@@ -120,12 +120,11 @@ static int litex_soc_ctrl_probe(struct platform_device *pdev)
return 0;
}
static int litex_soc_ctrl_remove(struct platform_device *pdev)
static void litex_soc_ctrl_remove(struct platform_device *pdev)
{
struct litex_soc_ctrl_device *soc_ctrl_dev = platform_get_drvdata(pdev);
unregister_restart_handler(&soc_ctrl_dev->reset_nb);
return 0;
}
static struct platform_driver litex_soc_ctrl_driver = {
......@@ -134,7 +133,7 @@ static struct platform_driver litex_soc_ctrl_driver = {
.of_match_table = of_match_ptr(litex_soc_ctrl_of_match)
},
.probe = litex_soc_ctrl_probe,
.remove = litex_soc_ctrl_remove,
.remove_new = litex_soc_ctrl_remove,
};
module_platform_driver(litex_soc_ctrl_driver);
......
......@@ -148,11 +148,9 @@ static int loongson2_guts_probe(struct platform_device *pdev)
return 0;
}
static int loongson2_guts_remove(struct platform_device *dev)
static void loongson2_guts_remove(struct platform_device *dev)
{
soc_device_unregister(soc_dev);
return 0;
}
/*
......@@ -171,7 +169,7 @@ static struct platform_driver loongson2_guts_driver = {
.of_match_table = loongson2_guts_of_match,
},
.probe = loongson2_guts_probe,
.remove = loongson2_guts_remove,
.remove_new = loongson2_guts_remove,
};
static int __init loongson2_guts_init(void)
......
......@@ -292,18 +292,16 @@ static int mtk_devapc_probe(struct platform_device *pdev)
return 0;
}
static int mtk_devapc_remove(struct platform_device *pdev)
static void mtk_devapc_remove(struct platform_device *pdev)
{
struct mtk_devapc_context *ctx = platform_get_drvdata(pdev);
stop_devapc(ctx);
return 0;
}
static struct platform_driver mtk_devapc_driver = {
.probe = mtk_devapc_probe,
.remove = mtk_devapc_remove,
.remove_new = mtk_devapc_remove,
.driver = {
.name = "mtk-devapc",
.of_match_table = mtk_devapc_dt_match,
......
......@@ -410,14 +410,12 @@ static int mtk_mmsys_probe(struct platform_device *pdev)
return 0;
}
static int mtk_mmsys_remove(struct platform_device *pdev)
static void mtk_mmsys_remove(struct platform_device *pdev)
{
struct mtk_mmsys *mmsys = platform_get_drvdata(pdev);
platform_device_unregister(mmsys->drm_pdev);
platform_device_unregister(mmsys->clks_pdev);
return 0;
}
static const struct of_device_id of_match_mtk_mmsys[] = {
......@@ -449,7 +447,7 @@ static struct platform_driver mtk_mmsys_drv = {
.of_match_table = of_match_mtk_mmsys,
},
.probe = mtk_mmsys_probe,
.remove = mtk_mmsys_remove,
.remove_new = mtk_mmsys_remove,
};
module_platform_driver(mtk_mmsys_drv);
......
......@@ -176,15 +176,13 @@ static int pxa_ssp_probe(struct platform_device *pdev)
return 0;
}
static int pxa_ssp_remove(struct platform_device *pdev)
static void pxa_ssp_remove(struct platform_device *pdev)
{
struct ssp_device *ssp = platform_get_drvdata(pdev);
mutex_lock(&ssp_lock);
list_del(&ssp->node);
mutex_unlock(&ssp_lock);
return 0;
}
static const struct platform_device_id ssp_id_table[] = {
......@@ -199,7 +197,7 @@ static const struct platform_device_id ssp_id_table[] = {
static struct platform_driver pxa_ssp_driver = {
.probe = pxa_ssp_probe,
.remove = pxa_ssp_remove,
.remove_new = pxa_ssp_remove,
.driver = {
.name = "pxa2xx-ssp",
.of_match_table = of_match_ptr(pxa_ssp_of_ids),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment