All of lore.kernel.org
 help / color / mirror / Atom feed
From: <zhang.songyi@zte.com.cn>
To: <davem@davemloft.net>
Cc: <zhang.songyi@zte.com.cn>, <sparclinux@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH linux-next] sparc: leon: grpci1: use devm_platform_ioremap_resource()
Date: Wed, 30 Nov 2022 15:53:06 +0800 (CST)	[thread overview]
Message-ID: <202211301553066158367@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/sparc/kernel/leon_pci_grpci1.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/sparc/kernel/leon_pci_grpci1.c b/arch/sparc/kernel/leon_pci_grpci1.c
index e6935d0ac1ec..bbe9c95541e0 100644
--- a/arch/sparc/kernel/leon_pci_grpci1.c
+++ b/arch/sparc/kernel/leon_pci_grpci1.c
@@ -515,7 +515,6 @@ static int grpci1_of_probe(struct platform_device *ofdev)
        int err, len;
        const int *tmp;
        u32 cfg, size, err_mask;
-       struct resource *res;

        if (grpci1priv) {
                dev_err(&ofdev->dev, "only one GRPCI1 supported\n");
@@ -536,8 +535,7 @@ static int grpci1_of_probe(struct platform_device *ofdev)
        priv->dev = &ofdev->dev;

        /* find device register base address */
-       res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
-       regs = devm_ioremap_resource(&ofdev->dev, res);
+       regs = devm_platform_ioremap_resource(ofdev, 0);
        if (IS_ERR(regs))
                return PTR_ERR(regs);

--
2.15.2

                 reply	other threads:[~2022-11-30  7:53 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=202211301553066158367@zte.com.cn \
    --to=zhang.songyi@zte.com.cn \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.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.