summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-npcm7xx.c
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-26 14:38:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-27 11:24:10 +0300
commit438ca58898dcf5ac010188a9cf3c18387427bd84 (patch)
treed9d8ad49b848c2e45dd646222c7179357dd2520d /drivers/usb/host/ehci-npcm7xx.c
parent31a7b792bdb15bd2fd6fd0cc3420db6ce12c9804 (diff)
downloadlinux-438ca58898dcf5ac010188a9cf3c18387427bd84.tar.xz
usb: ehci-npcm7xx: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li <frank.li@vivo.com> Link: https://lore.kernel.org/r/20230726113816.888-18-frank.li@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-npcm7xx.c')
-rw-r--r--drivers/usb/host/ehci-npcm7xx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-npcm7xx.c b/drivers/usb/host/ehci-npcm7xx.c
index 0b3b3bd689cf..3d3317a1a0b3 100644
--- a/drivers/usb/host/ehci-npcm7xx.c
+++ b/drivers/usb/host/ehci-npcm7xx.c
@@ -79,8 +79,7 @@ static int npcm7xx_ehci_hcd_drv_probe(struct platform_device *pdev)
goto fail;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- hcd->regs = devm_ioremap_resource(&pdev->dev, res);
+ hcd->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(hcd->regs)) {
retval = PTR_ERR(hcd->regs);
goto err_put_hcd;