linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Li Yang <leoyang.li@nxp.com>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	lkml <linux-kernel@vger.kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/2] soc: fsl: rcpm: Make use of the helper function devm_platform_ioremap_resource()
Date: Thu, 21 Oct 2021 19:37:20 -0500	[thread overview]
Message-ID: <CADRPPNT-ZGsn_04J8tLuyACqpdtSE0b8qg0dC7jPgTZcMhx26g@mail.gmail.com> (raw)
In-Reply-To: <20210908071631.660-2-caihuoqing@baidu.com>

On Wed, Sep 8, 2021 at 2:20 AM Cai Huoqing <caihuoqing@baidu.com> wrote:
>
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
>
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>

Applied for next.  Thanks.

> ---
>  drivers/soc/fsl/rcpm.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c
> index 90d3f4060b0c..3d0cae30c769 100644
> --- a/drivers/soc/fsl/rcpm.c
> +++ b/drivers/soc/fsl/rcpm.c
> @@ -146,7 +146,6 @@ static const struct dev_pm_ops rcpm_pm_ops = {
>  static int rcpm_probe(struct platform_device *pdev)
>  {
>         struct device   *dev = &pdev->dev;
> -       struct resource *r;
>         struct rcpm     *rcpm;
>         int ret;
>
> @@ -154,11 +153,7 @@ static int rcpm_probe(struct platform_device *pdev)
>         if (!rcpm)
>                 return -ENOMEM;
>
> -       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       if (!r)
> -               return -ENODEV;
> -
> -       rcpm->ippdexpcr_base = devm_ioremap_resource(&pdev->dev, r);
> +       rcpm->ippdexpcr_base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(rcpm->ippdexpcr_base)) {
>                 ret =  PTR_ERR(rcpm->ippdexpcr_base);
>                 return ret;
> --
> 2.25.1
>

  reply	other threads:[~2021-10-22  0:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08  7:16 [PATCH 1/2] soc: fsl: guts: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-08  7:16 ` [PATCH 2/2] soc: fsl: rcpm: " Cai Huoqing
2021-10-22  0:37   ` Li Yang [this message]
2021-10-22  0:34 ` [PATCH 1/2] soc: fsl: guts: " Li Yang

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=CADRPPNT-ZGsn_04J8tLuyACqpdtSE0b8qg0dC7jPgTZcMhx26g@mail.gmail.com \
    --to=leoyang.li@nxp.com \
    --cc=caihuoqing@baidu.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).