diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-26 13:37:49 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-07-27 10:24:08 +0200 |
commit | f62d9201b0427802a9443082507b6a7d4184f818 (patch) | |
tree | 7344f8fd5f6d4cd308ea1d307fdf24c143ecc8b2 /drivers/usb/host | |
parent | usb: chipidea/core: Use devm_platform_get_and_ioremap_resource() (diff) | |
download | linux-f62d9201b0427802a9443082507b6a7d4184f818.tar.xz linux-f62d9201b0427802a9443082507b6a7d4184f818.zip |
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')
-rw-r--r-- | drivers/usb/host/ohci-at91.c | 3 |
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; |