Commit b3bc7275 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Stephen Boyd

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230430190233.878921-3-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 61ca6ee7
...@@ -80,7 +80,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt2701_mm_id_table); ...@@ -80,7 +80,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt2701_mm_id_table);
static struct platform_driver clk_mt2701_mm_drv = { static struct platform_driver clk_mt2701_mm_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt2701-mm", .name = "clk-mt2701-mm",
}, },
......
...@@ -121,7 +121,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt2712_mm_id_table); ...@@ -121,7 +121,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt2712_mm_id_table);
static struct platform_driver clk_mt2712_mm_drv = { static struct platform_driver clk_mt2712_mm_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt2712-mm", .name = "clk-mt2712-mm",
}, },
......
...@@ -98,7 +98,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt6779_mm_id_table); ...@@ -98,7 +98,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt6779_mm_id_table);
static struct platform_driver clk_mt6779_mm_drv = { static struct platform_driver clk_mt6779_mm_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt6779-mm", .name = "clk-mt6779-mm",
}, },
......
...@@ -93,7 +93,7 @@ static struct platform_driver clk_mt6795_mm_drv = { ...@@ -93,7 +93,7 @@ static struct platform_driver clk_mt6795_mm_drv = {
}, },
.id_table = clk_mt6795_mm_id_table, .id_table = clk_mt6795_mm_id_table,
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
}; };
module_platform_driver(clk_mt6795_mm_drv); module_platform_driver(clk_mt6795_mm_drv);
......
...@@ -93,7 +93,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt6797_mm_id_table); ...@@ -93,7 +93,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt6797_mm_id_table);
static struct platform_driver clk_mt6797_mm_drv = { static struct platform_driver clk_mt6797_mm_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt6797-mm", .name = "clk-mt6797-mm",
}, },
......
...@@ -87,7 +87,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8167_mm_id_table); ...@@ -87,7 +87,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8167_mm_id_table);
static struct platform_driver clk_mt8167_mm_drv = { static struct platform_driver clk_mt8167_mm_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt8167-mm", .name = "clk-mt8167-mm",
}, },
......
...@@ -106,7 +106,7 @@ static struct platform_driver clk_mt8173_mm_drv = { ...@@ -106,7 +106,7 @@ static struct platform_driver clk_mt8173_mm_drv = {
}, },
.id_table = clk_mt8173_mm_id_table, .id_table = clk_mt8173_mm_id_table,
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
}; };
module_platform_driver(clk_mt8173_mm_drv); module_platform_driver(clk_mt8173_mm_drv);
......
...@@ -95,7 +95,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8183_mm_id_table); ...@@ -95,7 +95,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8183_mm_id_table);
static struct platform_driver clk_mt8183_mm_drv = { static struct platform_driver clk_mt8183_mm_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt8183-mm", .name = "clk-mt8183-mm",
}, },
......
...@@ -71,7 +71,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8186_mm_id_table); ...@@ -71,7 +71,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8186_mm_id_table);
static struct platform_driver clk_mt8186_mm_drv = { static struct platform_driver clk_mt8186_mm_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt8186-mm", .name = "clk-mt8186-mm",
}, },
......
...@@ -97,7 +97,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8188_vdo0_id_table); ...@@ -97,7 +97,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8188_vdo0_id_table);
static struct platform_driver clk_mt8188_vdo0_drv = { static struct platform_driver clk_mt8188_vdo0_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt8188-vdo0", .name = "clk-mt8188-vdo0",
}, },
......
...@@ -144,7 +144,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8188_vdo1_id_table); ...@@ -144,7 +144,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8188_vdo1_id_table);
static struct platform_driver clk_mt8188_vdo1_drv = { static struct platform_driver clk_mt8188_vdo1_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt8188-vdo1", .name = "clk-mt8188-vdo1",
}, },
......
...@@ -104,7 +104,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8188_vpp0_id_table); ...@@ -104,7 +104,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8188_vpp0_id_table);
static struct platform_driver clk_mt8188_vpp0_drv = { static struct platform_driver clk_mt8188_vpp0_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt8188-vpp0", .name = "clk-mt8188-vpp0",
}, },
......
...@@ -99,7 +99,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8188_vpp1_id_table); ...@@ -99,7 +99,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8188_vpp1_id_table);
static struct platform_driver clk_mt8188_vpp1_drv = { static struct platform_driver clk_mt8188_vpp1_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt8188-vpp1", .name = "clk-mt8188-vpp1",
}, },
......
...@@ -93,7 +93,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8192_mm_id_table); ...@@ -93,7 +93,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8192_mm_id_table);
static struct platform_driver clk_mt8192_mm_drv = { static struct platform_driver clk_mt8192_mm_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt8192-mm", .name = "clk-mt8192-mm",
}, },
......
...@@ -106,7 +106,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8195_vdo0_id_table); ...@@ -106,7 +106,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8195_vdo0_id_table);
static struct platform_driver clk_mt8195_vdo0_drv = { static struct platform_driver clk_mt8195_vdo0_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt8195-vdo0", .name = "clk-mt8195-vdo0",
}, },
......
...@@ -133,7 +133,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8195_vdo1_id_table); ...@@ -133,7 +133,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8195_vdo1_id_table);
static struct platform_driver clk_mt8195_vdo1_drv = { static struct platform_driver clk_mt8195_vdo1_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt8195-vdo1", .name = "clk-mt8195-vdo1",
}, },
......
...@@ -99,7 +99,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8195_vpp0_id_table); ...@@ -99,7 +99,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8195_vpp0_id_table);
static struct platform_driver clk_mt8195_vpp0_drv = { static struct platform_driver clk_mt8195_vpp0_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt8195-vpp0", .name = "clk-mt8195-vpp0",
}, },
......
...@@ -97,7 +97,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8195_vpp1_id_table); ...@@ -97,7 +97,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8195_vpp1_id_table);
static struct platform_driver clk_mt8195_vpp1_drv = { static struct platform_driver clk_mt8195_vpp1_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt8195-vpp1", .name = "clk-mt8195-vpp1",
}, },
......
...@@ -85,7 +85,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8365_mm_id_table); ...@@ -85,7 +85,7 @@ MODULE_DEVICE_TABLE(platform, clk_mt8365_mm_id_table);
static struct platform_driver clk_mt8365_mm_drv = { static struct platform_driver clk_mt8365_mm_drv = {
.probe = mtk_clk_pdev_probe, .probe = mtk_clk_pdev_probe,
.remove = mtk_clk_pdev_remove, .remove_new = mtk_clk_pdev_remove,
.driver = { .driver = {
.name = "clk-mt8365-mm", .name = "clk-mt8365-mm",
}, },
......
...@@ -648,14 +648,12 @@ int mtk_clk_simple_probe(struct platform_device *pdev) ...@@ -648,14 +648,12 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
} }
EXPORT_SYMBOL_GPL(mtk_clk_simple_probe); 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 *dev = &pdev->dev;
struct device_node *node = dev->parent->of_node; struct device_node *node = dev->parent->of_node;
__mtk_clk_simple_remove(pdev, node); __mtk_clk_simple_remove(pdev, node);
return 0;
} }
EXPORT_SYMBOL_GPL(mtk_clk_pdev_remove); EXPORT_SYMBOL_GPL(mtk_clk_pdev_remove);
......
...@@ -240,7 +240,7 @@ struct mtk_clk_desc { ...@@ -240,7 +240,7 @@ struct mtk_clk_desc {
}; };
int mtk_clk_pdev_probe(struct platform_device *pdev); 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); int mtk_clk_simple_probe(struct platform_device *pdev);
void mtk_clk_simple_remove(struct platform_device *pdev); void mtk_clk_simple_remove(struct platform_device *pdev);
......
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