summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ohci-at91.c
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-26 14:37:49 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-27 11:24:08 +0300
commitf62d9201b0427802a9443082507b6a7d4184f818 (patch)
tree7344f8fd5f6d4cd308ea1d307fdf24c143ecc8b2 /drivers/usb/host/ohci-at91.c
parent49aa25ad8574ee4410aa3910cbf6d28500c1c2c0 (diff)
downloadlinux-f62d9201b0427802a9443082507b6a7d4184f818.tar.xz
usb: ohci-at91: 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> Acked-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20230726113816.888-3-frank.li@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-at91.c')
-rw-r--r--drivers/usb/host/ohci-at91.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 3b023ea71f8d..7ed9a3bcea55 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -200,8 +200,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
return -ENOMEM;
ohci_at91 = hcd_to_ohci_at91_priv(hcd);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- hcd->regs = devm_ioremap_resource(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;