[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220419142859.380566-1-krzysztof.kozlowski@linaro.org>
Date: Tue, 19 Apr 2022 16:28:53 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Markus Mayer <mmayer@...adcom.com>,
Broadcom Kernel Team <bcm-kernel-feedback-list@...adcom.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Florian Fainelli <f.fainelli@...il.com>,
Santosh Shilimkar <ssantosh@...nel.org>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-tegra@...r.kernel.org
Subject: [PATCH 1/7] 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@...aro.org>
---
drivers/memory/da8xx-ddrctl.c | 3 +--
1 file changed, 1 insertion(+), 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);
--
2.32.0
Powered by blists - more mailing lists