summaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-26 13:37:48 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-27 10:24:08 +0200
commit49aa25ad8574ee4410aa3910cbf6d28500c1c2c0 (patch)
tree58a88d0d8d8949795e0df1c674162378eb4df387 /drivers/usb/chipidea
parentusb: ehci-npcm7xx: fix typo in npcm7xx_ehci_hcd_drv_probe() (diff)
downloadlinux-49aa25ad8574ee4410aa3910cbf6d28500c1c2c0.tar.xz
linux-49aa25ad8574ee4410aa3910cbf6d28500c1c2c0.zip
usb: chipidea/core: 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-2-frank.li@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r--drivers/usb/chipidea/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 51994d655b82..6e1196b53253 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -1028,8 +1028,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
return -ENODEV;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(dev, res);
+ base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(base))
return PTR_ERR(base);