summaryrefslogtreecommitdiffstats
path: root/drivers/memory
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2022-04-19 16:28:53 +0200
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2022-04-26 09:48:25 +0200
commit933713f5f49b816aa13a6441e41d98febef84dbe (patch)
tree030b2c70e4198110873ac11e142ba4fb0d53ee99 /drivers/memory
parentmemory: fsl-corenet-cf: Use helper function devm_platform_ioremap_resource() (diff)
downloadlinux-933713f5f49b816aa13a6441e41d98febef84dbe.tar.xz
linux-933713f5f49b816aa13a6441e41d98febef84dbe.zip
memory: da8xx-ddrctl: simplify platform_get_resource()
Use devm_platform_get_and_ioremap_resource() instead of platform_get_resource() and devm_ioremap_resource(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220419142859.380566-1-krzysztof.kozlowski@linaro.org
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/da8xx-ddrctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/memory/da8xx-ddrctl.c b/drivers/memory/da8xx-ddrctl.c
index 872addd0ec60..b32005bf269c 100644
--- a/drivers/memory/da8xx-ddrctl.c
+++ b/drivers/memory/da8xx-ddrctl.c
@@ -115,8 +115,7 @@ static int da8xx_ddrctl_probe(struct platform_device *pdev)
return -EINVAL;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ddrctl = devm_ioremap_resource(dev, res);
+ ddrctl = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(ddrctl)) {
dev_err(dev, "unable to map memory controller registers\n");
return PTR_ERR(ddrctl);