Commit 15b98bca authored by Cai Huoqing's avatar Cai Huoqing Committed by Sylwester Nawrocki

clk: samsung: exynos5433: Make use of devm_platform_ioremap_resource()

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210907085115.4254-1-caihuoqing@baidu.com
parent 63b86b01
...@@ -5564,7 +5564,6 @@ static int __init exynos5433_cmu_probe(struct platform_device *pdev) ...@@ -5564,7 +5564,6 @@ static int __init exynos5433_cmu_probe(struct platform_device *pdev)
struct exynos5433_cmu_data *data; struct exynos5433_cmu_data *data;
struct samsung_clk_provider *ctx; struct samsung_clk_provider *ctx;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct resource *res;
void __iomem *reg_base; void __iomem *reg_base;
int i; int i;
...@@ -5577,8 +5576,7 @@ static int __init exynos5433_cmu_probe(struct platform_device *pdev) ...@@ -5577,8 +5576,7 @@ static int __init exynos5433_cmu_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
ctx = &data->ctx; ctx = &data->ctx;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); reg_base = devm_platform_ioremap_resource(pdev, 0);
reg_base = devm_ioremap_resource(dev, res);
if (IS_ERR(reg_base)) if (IS_ERR(reg_base))
return PTR_ERR(reg_base); return PTR_ERR(reg_base);
......
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