summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc/udc-xilinx.c
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-26 19:37:51 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-27 10:24:08 +0200
commit187eeae3e9c7a1c315e5077b1d35c6622d0c28a1 (patch)
tree3653dd5b80fe6d9706e2f22e5fe4594e9667e629 /drivers/usb/gadget/udc/udc-xilinx.c
parentad089faf79e5ab949a301d60611842254060adb6 (diff)
usb: gadget: udc: udc-xilinx: 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-5-frank.li@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/udc/udc-xilinx.c')
-rw-r--r--drivers/usb/gadget/udc/udc-xilinx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-xilinx.c
index 0a025bf14e06..f301b09bf3f8 100644
--- a/drivers/usb/gadget/udc/udc-xilinx.c
+++ b/drivers/usb/gadget/udc/udc-xilinx.c
@@ -2078,8 +2078,7 @@ static int xudc_probe(struct platform_device *pdev)
udc->req->usb_req.buf = buff;
/* Map the registers */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- udc->addr = devm_ioremap_resource(&pdev->dev, res);
+ udc->addr = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(udc->addr))
return PTR_ERR(udc->addr);