summaryrefslogtreecommitdiffstats
path: root/drivers/soc/qcom/ocmem.c
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-09-08 10:02:12 +0200
committerBjorn Andersson <bjorn.andersson@linaro.org>2021-09-22 00:41:48 +0200
commit172037b12be46aee55dae3ae4f8468a2dbd5eaa3 (patch)
tree300e493b1096901c807574c92a4afbaa2defea4a /drivers/soc/qcom/ocmem.c
parentPM: AVS: qcom-cpr: Make use of the helper function devm_platform_ioremap_reso... (diff)
downloadlinux-172037b12be46aee55dae3ae4f8468a2dbd5eaa3.tar.xz
linux-172037b12be46aee55dae3ae4f8468a2dbd5eaa3.zip
soc: qcom: ocmem: Make use of the helper function devm_platform_ioremap_resource_byname()
Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20210908080216.1301-2-caihuoqing@baidu.com
Diffstat (limited to 'drivers/soc/qcom/ocmem.c')
-rw-r--r--drivers/soc/qcom/ocmem.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
index f1875dc31ae2..d2dacbbaafbd 100644
--- a/drivers/soc/qcom/ocmem.c
+++ b/drivers/soc/qcom/ocmem.c
@@ -300,7 +300,6 @@ static int ocmem_dev_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
unsigned long reg, region_size;
int i, j, ret, num_banks;
- struct resource *res;
struct ocmem *ocmem;
if (!qcom_scm_is_available())
@@ -321,8 +320,7 @@ static int ocmem_dev_probe(struct platform_device *pdev)
return ret;
}
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl");
- ocmem->mmio = devm_ioremap_resource(&pdev->dev, res);
+ ocmem->mmio = devm_platform_ioremap_resource_byname(pdev, "ctrl");
if (IS_ERR(ocmem->mmio)) {
dev_err(&pdev->dev, "Failed to ioremap ocmem_ctrl resource\n");
return PTR_ERR(ocmem->mmio);