From: Dejin Zheng <zhengdejin5@gmail.com>
To: gregkh@linuxfoundation.org, rafael@kernel.org,
hminas@synopsys.com, mathias.nyman@intel.com,
bgolaszewski@baylibre.com, arnd@arndb.de, geert@linux-m68k.org,
mchehab+samsung@kernel.org, treding@nvidia.com,
tglx@linutronix.de, suzuki.poulose@arm.com, hdegoede@redhat.com,
linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Dejin Zheng <zhengdejin5@gmail.com>
Subject: [PATCH v2 3/4] usb: host: hisilicon: convert to devm_platform_ioremap_and_get_resource
Date: Sat, 14 Mar 2020 13:26:37 +0800 [thread overview]
Message-ID: <20200314052638.6008-4-zhengdejin5@gmail.com> (raw)
In-Reply-To: <20200314052638.6008-1-zhengdejin5@gmail.com>
Use devm_platform_ioremap_and_get_resource() to simplify code, which
contains platform_get_resource() and devm_ioremap_resource(), it also
get the resource for use by the following code.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/usb/host/xhci-histb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/host/xhci-histb.c b/drivers/usb/host/xhci-histb.c
index 3c4abb5a1c3f..a314139e5343 100644
--- a/drivers/usb/host/xhci-histb.c
+++ b/drivers/usb/host/xhci-histb.c
@@ -219,8 +219,7 @@ static int xhci_histb_probe(struct platform_device *pdev)
if (irq < 0)
return irq;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- histb->ctrl = devm_ioremap_resource(&pdev->dev, res);
+ histb->ctrl = devm_platform_ioremap_and_get_resource(pdev, 0, &res);
if (IS_ERR(histb->ctrl))
return PTR_ERR(histb->ctrl);
--
2.25.0
next prev parent reply other threads:[~2020-03-15 2:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-14 5:26 [PATCH v2 0/4] drivers: new helper for ioremapping memory resources Dejin Zheng
2020-03-14 5:26 ` [PATCH v2 1/4] drivers: provide devm_platform_ioremap_and_get_resource() Dejin Zheng
2020-03-15 9:47 ` Geert Uytterhoeven
2020-03-15 10:01 ` Sergei Shtylyov
2020-03-15 12:38 ` Dejin Zheng
2020-03-14 5:26 ` [PATCH v2 2/4] usb: host: xhci-plat: convert to devm_platform_ioremap_and_get_resource Dejin Zheng
2020-03-14 5:26 ` Dejin Zheng [this message]
2020-03-14 5:26 ` [PATCH v2 4/4] usb: dwc2: " Dejin Zheng
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=20200314052638.6008-4-zhengdejin5@gmail.com \
--to=zhengdejin5@gmail.com \
--cc=arnd@arndb.de \
--cc=bgolaszewski@baylibre.com \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=hminas@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=mchehab+samsung@kernel.org \
--cc=rafael@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=tglx@linutronix.de \
--cc=treding@nvidia.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