clk: mediatek: Make mtk_clk_pdev_remove() return void

This function returns 0 unconditionally. Make it return no value instead
and convert the drivers making use of it to platform_driver's
.remove_new().

This makes the semantics in the callers of mtk_clk_simple_remove() clearer
and prepares for the quest to make platform driver's remove function return
void. There is no semantic change.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230430190233.878921-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
Uwe Kleine-König 2023-04-30 21:02:32 +02:00 committed by Stephen Boyd
parent 61ca6ee782
commit b3bc72757e
21 changed files with 21 additions and 23 deletions

View File

@ -80,7 +80,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt2701_mm_id_table);
static struct platform_driver clk_mt2701_mm_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt2701-mm",
},

View File

@ -121,7 +121,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt2712_mm_id_table);
static struct platform_driver clk_mt2712_mm_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt2712-mm",
},

View File

@ -98,7 +98,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt6779_mm_id_table);
static struct platform_driver clk_mt6779_mm_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt6779-mm",
},

View File

@ -93,7 +93,7 @@ static struct platform_driver clk_mt6795_mm_drv = {
},
.id_table = clk_mt6795_mm_id_table,
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
};
module_platform_driver(clk_mt6795_mm_drv);

View File

@ -93,7 +93,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt6797_mm_id_table);
static struct platform_driver clk_mt6797_mm_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt6797-mm",
},

View File

@ -87,7 +87,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8167_mm_id_table);
static struct platform_driver clk_mt8167_mm_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt8167-mm",
},

View File

@ -106,7 +106,7 @@ static struct platform_driver clk_mt8173_mm_drv = {
},
.id_table = clk_mt8173_mm_id_table,
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
};
module_platform_driver(clk_mt8173_mm_drv);

View File

@ -95,7 +95,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8183_mm_id_table);
static struct platform_driver clk_mt8183_mm_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt8183-mm",
},

View File

@ -71,7 +71,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8186_mm_id_table);
static struct platform_driver clk_mt8186_mm_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt8186-mm",
},

View File

@ -97,7 +97,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8188_vdo0_id_table);
static struct platform_driver clk_mt8188_vdo0_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt8188-vdo0",
},

View File

@ -144,7 +144,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8188_vdo1_id_table);
static struct platform_driver clk_mt8188_vdo1_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt8188-vdo1",
},

View File

@ -104,7 +104,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8188_vpp0_id_table);
static struct platform_driver clk_mt8188_vpp0_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt8188-vpp0",
},

View File

@ -99,7 +99,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8188_vpp1_id_table);
static struct platform_driver clk_mt8188_vpp1_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt8188-vpp1",
},

View File

@ -93,7 +93,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8192_mm_id_table);
static struct platform_driver clk_mt8192_mm_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt8192-mm",
},

View File

@ -106,7 +106,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8195_vdo0_id_table);
static struct platform_driver clk_mt8195_vdo0_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt8195-vdo0",
},

View File

@ -133,7 +133,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8195_vdo1_id_table);
static struct platform_driver clk_mt8195_vdo1_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt8195-vdo1",
},

View File

@ -99,7 +99,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8195_vpp0_id_table);
static struct platform_driver clk_mt8195_vpp0_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt8195-vpp0",
},

View File

@ -97,7 +97,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8195_vpp1_id_table);
static struct platform_driver clk_mt8195_vpp1_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt8195-vpp1",
},

View File

@ -85,7 +85,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8365_mm_id_table);
static struct platform_driver clk_mt8365_mm_drv = {
.probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove,
.remove_new = mtk_clk_pdev_remove,
.driver = {
.name = "clk-mt8365-mm",
},

View File

@ -648,14 +648,12 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
}
EXPORT_SYMBOL_GPL(mtk_clk_simple_probe);
int mtk_clk_pdev_remove(struct platform_device *pdev)
void mtk_clk_pdev_remove(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct device_node *node = dev->parent->of_node;
__mtk_clk_simple_remove(pdev, node);
return 0;
}
EXPORT_SYMBOL_GPL(mtk_clk_pdev_remove);

View File

@ -240,7 +240,7 @@ struct mtk_clk_desc {
};
int mtk_clk_pdev_probe(struct platform_device *pdev);
int mtk_clk_pdev_remove(struct platform_device *pdev);
void mtk_clk_pdev_remove(struct platform_device *pdev);
int mtk_clk_simple_probe(struct platform_device *pdev);
void mtk_clk_simple_remove(struct platform_device *pdev);