public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <zhang.songyi@zte.com.cn>
To: <daniel@zonque.org>
Cc: <haojian.zhuang@gmail.com>, <robert.jarzmik@free.fr>,
	<linux@armlinux.org.uk>, <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <zhang.songyi@zte.com.cn>
Subject: [PATCH linux-next] ARM: PXA: use devm_platform_ioremap_resource()
Date: Wed, 30 Nov 2022 15:37:36 +0800 (CST)	[thread overview]
Message-ID: <202211301537369277960@zte.com.cn> (raw)

From: zhang songyi <zhang.songyi@zte.com.cn>

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
---
 arch/arm/mach-pxa/pxa_cplds_irqs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/mach-pxa/pxa_cplds_irqs.c b/arch/arm/mach-pxa/pxa_cplds_irqs.c
index eda5a47d7fbb..e94b340589ed 100644
--- a/arch/arm/mach-pxa/pxa_cplds_irqs.c
+++ b/arch/arm/mach-pxa/pxa_cplds_irqs.c
@@ -104,7 +104,6 @@ static int cplds_resume(struct platform_device *pdev)

 static int cplds_probe(struct platform_device *pdev)
 {
-       struct resource *res;
        struct cplds *fpga;
        int ret;
        int base_irq;
@@ -127,8 +126,7 @@ static int cplds_probe(struct platform_device *pdev)
                        return ret;
        }

-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       fpga->base = devm_ioremap_resource(&pdev->dev, res);
+       fpga->base = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(fpga->base))
                return PTR_ERR(fpga->base);

--
2.15.2

                 reply	other threads:[~2022-11-30  7:37 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=202211301537369277960@zte.com.cn \
    --to=zhang.songyi@zte.com.cn \
    --cc=daniel@zonque.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=robert.jarzmik@free.fr \
    /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