From: <zhang.songyi@zte.com.cn>
To: <tsbogend@alpha.franken.de>
Cc: <zhang.songyi@zte.com.cn>, <cgel.zte@gmail.com>,
<chi.minghao@zte.com.cn>, <linux-mips@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH linux-next] mips/pci: use devm_platform_ioremap_resource()
Date: Wed, 30 Nov 2022 15:51:25 +0800 (CST) [thread overview]
Message-ID: <202211301551252968313@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/mips/pci/pci-rt3883.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c
index e07ae098bdd8..d59888aaed81 100644
--- a/arch/mips/pci/pci-rt3883.c
+++ b/arch/mips/pci/pci-rt3883.c
@@ -404,7 +404,6 @@ static int rt3883_pci_probe(struct platform_device *pdev)
struct rt3883_pci_controller *rpc;
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
- struct resource *res;
struct device_node *child;
u32 val;
int err;
@@ -414,8 +413,7 @@ static int rt3883_pci_probe(struct platform_device *pdev)
if (!rpc)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- rpc->base = devm_ioremap_resource(dev, res);
+ rpc->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(rpc->base))
return PTR_ERR(rpc->base);
--
2.15.2
next reply other threads:[~2022-11-30 7:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-30 7:51 zhang.songyi [this message]
2022-12-01 10:52 ` [PATCH linux-next] mips/pci: use devm_platform_ioremap_resource() Thomas Bogendoerfer
-- strict thread matches above, loose matches on Subject: below --
2022-11-30 7:49 zhang.songyi
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=202211301551252968313@zte.com.cn \
--to=zhang.songyi@zte.com.cn \
--cc=cgel.zte@gmail.com \
--cc=chi.minghao@zte.com.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.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 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.