From: Yangtao Li <frank.li@vivo.com>
To: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Philipp Zabel <p.zabel@pengutronix.de>
Cc: Yangtao Li <frank.li@vivo.com>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/7] reset: qcom: Convert to devm_platform_ioremap_resource()
Date: Tue, 4 Jul 2023 20:02:08 +0800 [thread overview]
Message-ID: <20230704120211.38122-4-frank.li@vivo.com> (raw)
In-Reply-To: <20230704120211.38122-1-frank.li@vivo.com>
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/reset/reset-qcom-pdc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/reset/reset-qcom-pdc.c b/drivers/reset/reset-qcom-pdc.c
index f22bb49a4ac8..ab245c701590 100644
--- a/drivers/reset/reset-qcom-pdc.c
+++ b/drivers/reset/reset-qcom-pdc.c
@@ -114,7 +114,6 @@ static int qcom_pdc_reset_probe(struct platform_device *pdev)
struct qcom_pdc_reset_data *data;
struct device *dev = &pdev->dev;
void __iomem *base;
- struct resource *res;
desc = device_get_match_data(&pdev->dev);
if (!desc)
@@ -125,8 +124,7 @@ static int qcom_pdc_reset_probe(struct platform_device *pdev)
return -ENOMEM;
data->desc = desc;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
--
2.39.0
next prev parent reply other threads:[~2023-07-04 12:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 12:02 [PATCH 1/7] reset: brcmstb: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-04 12:02 ` [PATCH 2/7] reset: meson-audio-arb: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-04 12:12 ` Neil Armstrong
2023-07-04 12:02 ` [PATCH 3/7] reset: qcom-aoss: " Yangtao Li
2023-07-04 12:02 ` Yangtao Li [this message]
2023-07-04 12:02 ` [PATCH 5/7] reset: simple: Convert to devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-04 12:02 ` [PATCH 6/7] reset: sunplus: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-04 12:02 ` [PATCH 7/7] reset: uniphier-glue: " Yangtao Li
2023-07-04 14:47 ` [PATCH 1/7] reset: brcmstb: " Florian Fainelli
2023-11-29 11:49 ` Philipp Zabel
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=20230704120211.38122-4-frank.li@vivo.com \
--to=frank.li@vivo.com \
--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 \
--cc=p.zabel@pengutronix.de \
/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
all inboxes | Powered by JetHome®