summaryrefslogtreecommitdiff
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorzhaoxiao <long870912@gmail.com>2021-09-06 10:11:47 +0300
committerBjorn Andersson <bjorn.andersson@linaro.org>2021-10-15 17:49:55 +0300
commit9db9c738ac89fb1c408c4ec819633540856ea62f (patch)
tree93d9f5f5367076635f914ac2975cf456064b5e0a /drivers/remoteproc
parent0374a4ea7269645c46c3eb288526ea072fa19e79 (diff)
downloadlinux-9db9c738ac89fb1c408c4ec819633540856ea62f.tar.xz
remoteproc: qcom_q6v5_mss: Use devm_platform_ioremap_resource_byname() to simplify code
In this function, devm_platform_ioremap_resource_byname() should be suitable to simplify code. Signed-off-by: zhaoxiao <long870912@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20210906071147.9095-1-long870912@gmail.com
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/qcom_q6v5_mss.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index ec0701126ab3..43ea8455546c 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -1615,17 +1615,14 @@ static void qcom_msa_handover(struct qcom_q6v5 *q6v5)
static int q6v5_init_mem(struct q6v5 *qproc, struct platform_device *pdev)
{
struct of_phandle_args args;
- struct resource *res;
int halt_cell_cnt = 3;
int ret;
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "qdsp6");
- qproc->reg_base = devm_ioremap_resource(&pdev->dev, res);
+ qproc->reg_base = devm_platform_ioremap_resource_byname(pdev, "qdsp6");
if (IS_ERR(qproc->reg_base))
return PTR_ERR(qproc->reg_base);
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rmb");
- qproc->rmb_base = devm_ioremap_resource(&pdev->dev, res);
+ qproc->rmb_base = devm_platform_ioremap_resource_byname(pdev, "rmb");
if (IS_ERR(qproc->rmb_base))
return PTR_ERR(qproc->rmb_base);