mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
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 commit5c5a7680e6
("platform: Provide a remove callback that returns no value") for the rationale. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmUrDBAACgkQj4D7WH0S /k4SdggAk4dtkMnhFT1gUZjaYJWKibyuIWhCu6EkDTlLlefEWQFFT6NX5Vdz59i6 /XUurcZx4eVtXq89L4/BI/cTjhrrlMIFlZwtK63a1tniUh3mK6RIanIlIOQMoai+ P4B4V1RSIlj72njB6tJ8gVO2XU5W8I6hKNvZs7ZXyJp4KgRZqZyniV7os72ExJrm H4NNcoiifRS2j1213xfyWyEA40yHj2aywGaXP7gjKm+AU4F6DxDwFJ8YhOvEnsu1 8Uda4J+Bs7+y46O9yqpLutI9W7mpBvk+2CAgzeIE+beEO221xNhgoTklvmT3DEbb FvHcYHiNWzrpgwsNSwG+qXaSuy/vwQ== =0IZS -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUtolQACgkQYKtH/8kJ UidseA/+PhpQ6ntmfjygZM2aY/WSbq3qFMTlFH17OFaGSBGcNP7gpFy5RbtpIem5 Y9jeofVmaA4nTLjkpZcJQdCiDCqw5U1Ew0P7dt+cBtnEwfDQk/OfNwaD8Zbr5i27 hG8AeY/2AiqINaxt13ZYECnwv5w+tob2ZkrvWVW0ykJdqBLO9U4lBWIFx9YvhnpV jO0bUuDeKj34vhFzd2v6w+Py/xfJlTpgXbPgtO8AQ06kmpAk5ayj9ccqGvYXwEYw BuO4Xht2L0yE3nQVFNuG27WXjVqAdH1lEX/KTaYFqgyj8zRHbU7dM/qqa4UO7OqY 9URF8IOPJYjrvoOxskv+IVOCosslxMOMYw8KrKuWx7ZuFh/NwQOjz6oOvzrp3tkl Kk5Fkoc0TayzYIPS4dTeVuiZDwUj+44tYIxtHqDjyUGBXH96CpyAuX57NK3nyRNK Iv6TsvKH9GexZqjpRK2j89ltVcABTSenTsx3LVl/fWO9UmhohoVvbC1ZbGJmT3Sf 0v8RIedRWcWGrctMfzu4P/dyOkznc/utlqlL2ZoIB8LSyu5mUXDY8vycb+3Z9O07 xKTVlEYY6XeW6hJ10f6Meom8+4+XUbcBw+++bFeUJ35kywxQtOFMf9bYBC7YSF5Y 9f68uZIspUyXOj+q8n5nvZ6FYkj1HDPzBuBHxznaupIcpXcJ5uw= =YJuL -----END PGP SIGNATURE----- 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 commit5c5a7680e6
("platform: Provide a remove callback that returns no value") for the rationale. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
4d8220323f
@ -300,12 +300,10 @@ err_register_mc:
|
||||
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 @@ err_tsa_serial_disconnect:
|
||||
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 @@ unregister_pcc_chan:
|
||||
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 @@ out_probe_done:
|
||||
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),
|
||||
|
Loading…
Reference in New Issue
Block a user