summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-26 19:37:52 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-27 10:24:08 +0200
commit3318f9c1a87b0c4983141cd1740fc553214b9f42 (patch)
tree9189caf6626a0e0241aede13f106ab4da6dd7c46
parent187eeae3e9c7a1c315e5077b1d35c6622d0c28a1 (diff)
downloadlinux-stable-3318f9c1a87b0c4983141cd1740fc553214b9f42.tar.gz
linux-stable-3318f9c1a87b0c4983141cd1740fc553214b9f42.tar.bz2
linux-stable-3318f9c1a87b0c4983141cd1740fc553214b9f42.zip
usb: gadget: aspeed: 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-6-frank.li@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/gadget/udc/aspeed-vhub/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/aspeed-vhub/core.c b/drivers/usb/gadget/udc/aspeed-vhub/core.c
index 16f2db8c4a2b..f60a019bb173 100644
--- a/drivers/usb/gadget/udc/aspeed-vhub/core.c
+++ b/drivers/usb/gadget/udc/aspeed-vhub/core.c
@@ -328,8 +328,7 @@ static int ast_vhub_probe(struct platform_device *pdev)
vhub->port_irq_mask = GENMASK(VHUB_IRQ_DEV1_BIT + vhub->max_ports - 1,
VHUB_IRQ_DEV1_BIT);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- vhub->regs = devm_ioremap_resource(&pdev->dev, res);
+ vhub->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(vhub->regs)) {
dev_err(&pdev->dev, "Failed to map resources\n");
return PTR_ERR(vhub->regs);