clk: mediatek: clk-mtk: Switch to device_get_match_data()
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Mon, 6 Mar 2023 14:04:50 +0000 (15:04 +0100)
committerStephen Boyd <sboyd@kernel.org>
Mon, 13 Mar 2023 18:50:13 +0000 (11:50 -0700)
Instead of using of_device_get_match_data(), switch to the generic
device_get_match_data().

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>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20230306140543.1813621-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/mediatek/clk-mtk.c

index 14e8b64a32a3c300d5a99ed8d9459c74e84e1510..f0b723372b52840fc1d0f1bcf5b6336ace1e9e69 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
@@ -471,7 +470,7 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
        void __iomem *base;
        int num_clks, r;
 
-       mcd = of_device_get_match_data(&pdev->dev);
+       mcd = device_get_match_data(&pdev->dev);
        if (!mcd)
                return -EINVAL;
 
@@ -586,7 +585,7 @@ EXPORT_SYMBOL_GPL(mtk_clk_simple_probe);
 
 int mtk_clk_simple_remove(struct platform_device *pdev)
 {
-       const struct mtk_clk_desc *mcd = of_device_get_match_data(&pdev->dev);
+       const struct mtk_clk_desc *mcd = device_get_match_data(&pdev->dev);
        struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
        struct device_node *node = pdev->dev.of_node;