summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-atmel.c
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-26 14:37:56 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-27 11:24:09 +0300
commit5645caa80ffd02c27ea8e5a43e7c847eadb421f5 (patch)
treeae2d688e80366357db8afa9a3df264b842ebc82f /drivers/usb/host/ehci-atmel.c
parent50fd16ebf2f18299373673cc5c2eeb1e8e1367ec (diff)
downloadlinux-5645caa80ffd02c27ea8e5a43e7c847eadb421f5.tar.xz
usb: ehci-atmel: 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> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/20230726113816.888-10-frank.li@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-atmel.c')
-rw-r--r--drivers/usb/host/ehci-atmel.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index 61808c51e702..e14b66d848ee 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -122,8 +122,7 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev)
}
atmel_ehci = hcd_to_atmel_ehci_priv(hcd);
- 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 fail_request_resource;