diff mbox series

remoteproc: qcom_q6v5_mss: Use devm_platform_ioremap_resource_byname() to simplify code

Message ID 20210906071147.9095-1-long870912@gmail.com (mailing list archive)
State Not Applicable
Headers show
Series remoteproc: qcom_q6v5_mss: Use devm_platform_ioremap_resource_byname() to simplify code | expand

Commit Message

zhaoxiao Sept. 6, 2021, 7:11 a.m. UTC
In this function, devm_platform_ioremap_resource_byname() should be
suitable to simplify code.

Signed-off-by: zhaoxiao <long870912@gmail.com>
---
 drivers/remoteproc/qcom_q6v5_mss.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

Bjorn Andersson Oct. 15, 2021, 5:22 p.m. UTC | #1
On Mon, 6 Sep 2021 15:11:47 +0800, zhaoxiao wrote:
> In this function, devm_platform_ioremap_resource_byname() should be
> suitable to simplify code.
> 
> 

Applied, thanks!

[1/1] remoteproc: qcom_q6v5_mss: Use devm_platform_ioremap_resource_byname() to simplify code
      commit: 9db9c738ac89fb1c408c4ec819633540856ea62f

Best regards,
diff mbox series

Patch

diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index 423b31dfa574..38d57af3149d 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -1480,16 +1480,13 @@  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 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);