drivers: clk: Fix void pointer to enum cast
authorAnan Jaser <ananjaser@gmail.com>
Tue, 29 Sep 2020 08:03:12 +0000 (12:03 +0400)
committerivanmeler <i_ivan@windowslive.com>
Wed, 13 Apr 2022 21:14:10 +0000 (21:14 +0000)
drivers/clk/samsung/clk-exynos-audss.c:93:12: error: cast to smaller integer type 'enum exynos_audss_clk_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
        variant = (enum exynos_audss_clk_type)match->data;

drivers/clk/samsung/clk-exynos-audss.c

index 4e9584d79089d355fcc67b4154724f4d6cc2ed62..b5e867cf43aac6a77437068fa982fad626e92ab6 100644 (file)
@@ -118,7 +118,7 @@ static int exynos_audss_clk_probe(struct platform_device *pdev)
        match = of_match_node(exynos_audss_clk_of_match, pdev->dev.of_node);
        if (!match)
                return -EINVAL;
-       variant = (enum exynos_audss_clk_type)match->data;
+       variant = (enum exynos_audss_clk_type)(long)match->data;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        reg_base = devm_ioremap_resource(&pdev->dev, res);