From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Qilong Zhang <zhangqilong3@huawei.com>
Cc: agross@kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] soc: use devm_platform_ioremap_resource_byname
Date: Thu, 17 Sep 2020 04:36:08 +0000 [thread overview]
Message-ID: <20200917043608.GA108053@uller> (raw)
In-Reply-To: <20200916111517.99670-1-zhangqilong3@huawei.com>
On Wed 16 Sep 11:15 UTC 2020, Qilong Zhang wrote:
> Use the devm_platform_ioremap_resource_byname() helper instead of
> calling platform_get_resource_byname() and devm_ioremap_resource()
> separately.
>
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
I fixed up the subject line to match the previous commits in this driver
and applied the patch.
Thank you,
Bjorn
> ---
> drivers/soc/qcom/llcc-qcom.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c
> index 429b5a60a1ba..70fbe70c6213 100644
> --- a/drivers/soc/qcom/llcc-qcom.c
> +++ b/drivers/soc/qcom/llcc-qcom.c
> @@ -387,7 +387,6 @@ static int qcom_llcc_remove(struct platform_device *pdev)
> static struct regmap *qcom_llcc_init_mmio(struct platform_device *pdev,
> const char *name)
> {
> - struct resource *res;
> void __iomem *base;
> struct regmap_config llcc_regmap_config = {
> .reg_bits = 32,
> @@ -396,11 +395,7 @@ static struct regmap *qcom_llcc_init_mmio(struct platform_device *pdev,
> .fast_io = true,
> };
>
> - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, name);
> - if (!res)
> - return ERR_PTR(-ENODEV);
> -
> - base = devm_ioremap_resource(&pdev->dev, res);
> + base = devm_platform_ioremap_resource_byname(pdev, name);
> if (IS_ERR(base))
> return ERR_CAST(base);
>
> --
> 2.17.1
>
prev parent reply other threads:[~2020-09-17 4:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-16 11:15 [PATCH -next] soc: use devm_platform_ioremap_resource_byname Qilong Zhang
2020-09-17 4:36 ` Bjorn Andersson [this message]
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=20200917043608.GA108053@uller \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zhangqilong3@huawei.com \
/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