summaryrefslogtreecommitdiffstats
path: root/drivers/memory
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2019-12-22 18:50:32 +0000
committerKrzysztof Kozlowski <krzk@kernel.org>2019-12-30 18:33:15 +0100
commit5383953f1c4f2f1a84d01341971b2bfb193730cf (patch)
treeb70ccee594c34c7ef6216f71d485c3c8ac1b47aa /drivers/memory
parent81a0efb7af7a586b2f0dd73ac1913b1691cdff12 (diff)
downloadlinux-5383953f1c4f2f1a84d01341971b2bfb193730cf.tar.bz2
memory: samsung: exynos5422-dmc: Convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Acked-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/samsung/exynos5422-dmc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c
index 47dbf6d1789f..81a1b1d01683 100644
--- a/drivers/memory/samsung/exynos5422-dmc.c
+++ b/drivers/memory/samsung/exynos5422-dmc.c
@@ -1374,7 +1374,6 @@ static int exynos5_dmc_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
struct exynos5_dmc *dmc;
- struct resource *res;
int irq[2];
dmc = devm_kzalloc(dev, sizeof(*dmc), GFP_KERNEL);
@@ -1386,13 +1385,11 @@ static int exynos5_dmc_probe(struct platform_device *pdev)
dmc->dev = dev;
platform_set_drvdata(pdev, dmc);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dmc->base_drexi0 = devm_ioremap_resource(dev, res);
+ dmc->base_drexi0 = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dmc->base_drexi0))
return PTR_ERR(dmc->base_drexi0);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- dmc->base_drexi1 = devm_ioremap_resource(dev, res);
+ dmc->base_drexi1 = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(dmc->base_drexi1))
return PTR_ERR(dmc->base_drexi1);