clk: mediatek: mt8192: Propagate struct device for gate clocks
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Fri, 20 Jan 2023 09:20:32 +0000 (10:20 +0100)
committerStephen Boyd <sboyd@kernel.org>
Tue, 31 Jan 2023 00:44:53 +0000 (16:44 -0800)
Convert instances of mtk_clk_register_gates() to use the newer
mtk_clk_register_gates_with_dev() to propagate struct device to
the clk framework.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Miles Chen <miles.chen@mediatek.com>
Link: https://lore.kernel.org/r/20230120092053.182923-3-angelogioacchino.delregno@collabora.com
Tested-by: Mingming Su <mingming.su@mediatek.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/mediatek/clk-mt8192.c

index 5196a366dd5597fd065c2ddcddbf3b51ea70caaa..6f4525a4ff75a3f765716402b38a4a8c05648047 100644 (file)
@@ -1127,7 +1127,8 @@ static int clk_mt8192_top_probe(struct platform_device *pdev)
        if (r)
                goto unregister_top_composites;
 
-       r = mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks), top_clk_data);
+       r = mtk_clk_register_gates_with_dev(node, top_clks, ARRAY_SIZE(top_clks),
+                                           top_clk_data, &pdev->dev);
        if (r)
                goto unregister_adj_divs_composites;
 
@@ -1170,7 +1171,8 @@ static int clk_mt8192_infra_probe(struct platform_device *pdev)
        if (!clk_data)
                return -ENOMEM;
 
-       r = mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks), clk_data);
+       r = mtk_clk_register_gates_with_dev(node, infra_clks, ARRAY_SIZE(infra_clks),
+                                           clk_data, &pdev->dev);
        if (r)
                goto free_clk_data;
 
@@ -1201,7 +1203,8 @@ static int clk_mt8192_peri_probe(struct platform_device *pdev)
        if (!clk_data)
                return -ENOMEM;
 
-       r = mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks), clk_data);
+       r = mtk_clk_register_gates_with_dev(node, peri_clks, ARRAY_SIZE(peri_clks),
+                                           clk_data, &pdev->dev);
        if (r)
                goto free_clk_data;
 
@@ -1229,7 +1232,9 @@ static int clk_mt8192_apmixed_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data);
-       r = mtk_clk_register_gates(node, apmixed_clks, ARRAY_SIZE(apmixed_clks), clk_data);
+       r = mtk_clk_register_gates_with_dev(node, apmixed_clks,
+                                           ARRAY_SIZE(apmixed_clks), clk_data,
+                                           &pdev->dev);
        if (r)
                goto free_clk_data;