public inbox for linux-arm-msm@vger.kernel.org
 help / color / mirror / Atom feed
From: <ye.xingchen@zte.com.cn>
To: <andersson@kernel.org>
Cc: <agross@kernel.org>, <konrad.dybcio@linaro.org>,
	<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] bus: qcom-ssc-block-bus: use devm_platform_ioremap_resource_byname()
Date: Tue, 21 Mar 2023 19:22:16 +0800 (CST)	[thread overview]
Message-ID: <202303211922161400872@zte.com.cn> (raw)

From: Ye Xingchen <ye.xingchen@zte.com.cn>

Convert platform_get_resource_byname(),devm_ioremap_resource() to a single
call to devm_platform_ioremap_resource_byname(), as this is exactly what
this function does.

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
---
 drivers/bus/qcom-ssc-block-bus.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/qcom-ssc-block-bus.c b/drivers/bus/qcom-ssc-block-bus.c
index eedeb29a5ff3..ae95112d4e20 100644
--- a/drivers/bus/qcom-ssc-block-bus.c
+++ b/drivers/bus/qcom-ssc-block-bus.c
@@ -277,14 +277,14 @@ static int qcom_ssc_block_bus_probe(struct platform_device *pdev)
 		return dev_err_probe(&pdev->dev, ret, "error when enabling power domains\n");

 	/* low level overrides for when the HW logic doesn't "just work" */
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpm_sscaon_config0");
-	data->reg_mpm_sscaon_config0 = devm_ioremap_resource(&pdev->dev, res);
+	data->reg_mpm_sscaon_config0 = devm_platform_ioremap_resource_byname(pdev,
+									     "mpm_sscaon_config0");
 	if (IS_ERR(data->reg_mpm_sscaon_config0))
 		return dev_err_probe(&pdev->dev, PTR_ERR(data->reg_mpm_sscaon_config0),
 				     "Failed to ioremap mpm_sscaon_config0\n");

-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpm_sscaon_config1");
-	data->reg_mpm_sscaon_config1 = devm_ioremap_resource(&pdev->dev, res);
+	data->reg_mpm_sscaon_config1 = devm_platform_ioremap_resource_byname(pdev,
+									     "mpm_sscaon_config1");
 	if (IS_ERR(data->reg_mpm_sscaon_config1))
 		return dev_err_probe(&pdev->dev, PTR_ERR(data->reg_mpm_sscaon_config1),
 				     "Failed to ioremap mpm_sscaon_config1\n");
-- 
2.25.1

                 reply	other threads:[~2023-03-21 11:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202303211922161400872@zte.com.cn \
    --to=ye.xingchen@zte.com.cn \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox