Commit 81a0efb7 authored by Yangtao Li's avatar Yangtao Li Committed by Krzysztof Kozlowski

soc: samsung: exynos-pmu: Convert to devm_platform_ioremap_resource

Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
parent e42617b8
...@@ -110,10 +110,8 @@ EXPORT_SYMBOL_GPL(exynos_get_pmu_regmap); ...@@ -110,10 +110,8 @@ EXPORT_SYMBOL_GPL(exynos_get_pmu_regmap);
static int exynos_pmu_probe(struct platform_device *pdev) static int exynos_pmu_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct resource *res;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); pmu_base_addr = devm_platform_ioremap_resource(pdev, 0);
pmu_base_addr = devm_ioremap_resource(dev, res);
if (IS_ERR(pmu_base_addr)) if (IS_ERR(pmu_base_addr))
return PTR_ERR(pmu_base_addr); return PTR_ERR(pmu_base_addr);
......
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