All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH 4/5] slimbus: qcom-ngd-ctrl: use devm_platform_get_and_ioremap_resource()
Date: Fri, 23 Sep 2022 17:57:39 +0200	[thread overview]
Message-ID: <20220923155740.422411-4-krzysztof.kozlowski@linaro.org> (raw)
In-Reply-To: <20220923155740.422411-1-krzysztof.kozlowski@linaro.org>

Simplify the code with devm_platform_get_and_ioremap_resource().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/slimbus/qcom-ngd-ctrl.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index cec11aa106bf..548dd7661334 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1522,7 +1522,6 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct qcom_slim_ngd_ctrl *ctrl;
-	struct resource *res;
 	int ret;
 	struct pdr_service *pds;
 
@@ -1532,8 +1531,7 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
 
 	dev_set_drvdata(dev, ctrl);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	ctrl->base = devm_ioremap_resource(dev, res);
+	ctrl->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
 	if (IS_ERR(ctrl->base))
 		return PTR_ERR(ctrl->base);
 
-- 
2.34.1


  parent reply	other threads:[~2022-09-23 15:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23 15:57 [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage Krzysztof Kozlowski
2022-09-23 15:57 ` [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom,apq8064-slim compatible Krzysztof Kozlowski
2022-09-23 15:57   ` [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom, apq8064-slim compatible Krzysztof Kozlowski
2022-09-26  8:03   ` [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom,apq8064-slim compatible Neil Armstrong
2022-09-23 15:57 ` [PATCH 3/5] slimbus: qcom-ctrl: use devm_platform_ioremap_resource_byname() Krzysztof Kozlowski
2022-09-26  8:03   ` Neil Armstrong
2022-09-23 15:57 ` Krzysztof Kozlowski [this message]
2022-09-26  8:03   ` [PATCH 4/5] slimbus: qcom-ngd-ctrl: use devm_platform_get_and_ioremap_resource() Neil Armstrong
2022-09-23 15:57 ` [PATCH 5/5] slimbus: qcom-ngd-ctrl: reinit the reconf completion flag Krzysztof Kozlowski
2022-10-26 16:30 ` [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage Krzysztof Kozlowski
2022-10-26 16:30   ` Krzysztof Kozlowski
2022-10-26 16:31 ` Krzysztof Kozlowski
2022-10-26 16:31   ` Krzysztof Kozlowski
2022-10-31 18:28 ` Srinivas Kandagatla

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=20220923155740.422411-4-krzysztof.kozlowski@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=agross@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=andersson@kernel.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.kandagatla@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.