Commit 61ca6ee7 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Stephen Boyd
Browse files

clk: mediatek: Make mtk_clk_simple_remove() return void



__mtk_clk_simple_remove() and so also mtk_clk_simple_remove() return
zero unconditionally. Make them 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-2-u.kleine-koenig@pengutronix.de


Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent ac9a7868
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -150,15 +150,15 @@ static int clk_mt2701_aud_probe(struct platform_device *pdev)
	return r;
}

static int clk_mt2701_aud_remove(struct platform_device *pdev)
static void clk_mt2701_aud_remove(struct platform_device *pdev)
{
	of_platform_depopulate(&pdev->dev);
	return mtk_clk_simple_remove(pdev);
	mtk_clk_simple_remove(pdev);
}

static struct platform_driver clk_mt2701_aud_drv = {
	.probe = clk_mt2701_aud_probe,
	.remove = clk_mt2701_aud_remove,
	.remove_new = clk_mt2701_aud_remove,
	.driver = {
		.name = "clk-mt2701-aud",
		.of_match_table = of_match_clk_mt2701_aud,
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ MODULE_DEVICE_TABLE(of, of_match_clk_mt2701_bdp);

static struct platform_driver clk_mt2701_bdp_drv = {
	.probe = mtk_clk_simple_probe,
	.remove = mtk_clk_simple_remove,
	.remove_new = mtk_clk_simple_remove,
	.driver = {
		.name = "clk-mt2701-bdp",
		.of_match_table = of_match_clk_mt2701_bdp,
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ MODULE_DEVICE_TABLE(of, of_match_clk_mt2701_eth);

static struct platform_driver clk_mt2701_eth_drv = {
	.probe = mtk_clk_simple_probe,
	.remove = mtk_clk_simple_remove,
	.remove_new = mtk_clk_simple_remove,
	.driver = {
		.name = "clk-mt2701-eth",
		.of_match_table = of_match_clk_mt2701_eth,
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ MODULE_DEVICE_TABLE(of, of_match_clk_mt2701_g3d);

static struct platform_driver clk_mt2701_g3d_drv = {
	.probe = mtk_clk_simple_probe,
	.remove = mtk_clk_simple_remove,
	.remove_new = mtk_clk_simple_remove,
	.driver = {
		.name = "clk-mt2701-g3d",
		.of_match_table = of_match_clk_mt2701_g3d,
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ MODULE_DEVICE_TABLE(of, of_match_clk_mt2701_hif);

static struct platform_driver clk_mt2701_hif_drv = {
	.probe = mtk_clk_simple_probe,
	.remove = mtk_clk_simple_remove,
	.remove_new = mtk_clk_simple_remove,
	.driver = {
		.name = "clk-mt2701-hif",
		.of_match_table = of_match_clk_mt2701_hif,
Loading