summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-mv.c
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-26 14:38:12 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-27 11:24:11 +0300
commitd64d7f919f563686bb56aa57c3e8c3bad8f2afc1 (patch)
tree82b16cf43f82f93890c463c2dad728d180e4019a /drivers/usb/host/ehci-mv.c
parenteeaf04a9cfb4572dfe8faaaeadde68c91798c35c (diff)
downloadlinux-d64d7f919f563686bb56aa57c3e8c3bad8f2afc1.tar.xz
usb: ehci-mv: 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-26-frank.li@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-mv.c')
-rw-r--r--drivers/usb/host/ehci-mv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c
index 9320cf0e5bc7..2f1fc7eb8b72 100644
--- a/drivers/usb/host/ehci-mv.c
+++ b/drivers/usb/host/ehci-mv.c
@@ -142,8 +142,7 @@ static int mv_ehci_probe(struct platform_device *pdev)
goto err_put_hcd;
}
- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ehci_mv->base = devm_ioremap_resource(&pdev->dev, r);
+ ehci_mv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &r);
if (IS_ERR(ehci_mv->base)) {
retval = PTR_ERR(ehci_mv->base);
goto err_put_hcd;