diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-26 19:38:00 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-07-27 10:24:09 +0200 |
commit | 54a15a7e6ad54ca2100f7eea79ff31a19a85dd51 (patch) | |
tree | 0030b51bcf99b31d141a3a14db7d326c5cafaff5 /drivers/usb | |
parent | a9ec284ba1714ad4260e976d6abd1c93e363c499 (diff) | |
download | linux-stable-54a15a7e6ad54ca2100f7eea79ff31a19a85dd51.tar.gz linux-stable-54a15a7e6ad54ca2100f7eea79ff31a19a85dd51.tar.bz2 linux-stable-54a15a7e6ad54ca2100f7eea79ff31a19a85dd51.zip |
usb: ohci-da8xx: 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-14-frank.li@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ohci-da8xx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index 9bd6cb9af364..d9adae53466b 100644 --- a/drivers/usb/host/ohci-da8xx.c +++ b/drivers/usb/host/ohci-da8xx.c @@ -436,8 +436,7 @@ static int ohci_da8xx_probe(struct platform_device *pdev) goto err; } - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hcd->regs = devm_ioremap_resource(dev, mem); + hcd->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); if (IS_ERR(hcd->regs)) { error = PTR_ERR(hcd->regs); goto err; |