summaryrefslogtreecommitdiff
path: root/drivers/memory/da8xx-ddrctl.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2022-04-19 17:28:53 +0300
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2022-04-26 10:48:25 +0300
commit933713f5f49b816aa13a6441e41d98febef84dbe (patch)
tree030b2c70e4198110873ac11e142ba4fb0d53ee99 /drivers/memory/da8xx-ddrctl.c
parentd37b07897e5024088b2170b8e6e1c68d567b9be6 (diff)
downloadlinux-933713f5f49b816aa13a6441e41d98febef84dbe.tar.xz
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/da8xx-ddrctl.c')
-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);