diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2020-07-22 09:51:13 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-29 16:49:38 +0200 |
commit | c94622683443a8eab17df07b9124304f8c40c01c (patch) | |
tree | 325d2d06c1b71d6c33c2ff18b48d8d0342be5dbb /drivers/usb | |
parent | usb: dwc3: convert to devm_platform_ioremap_resource_byname (diff) | |
download | linux-c94622683443a8eab17df07b9124304f8c40c01c.tar.xz linux-c94622683443a8eab17df07b9124304f8c40c01c.zip |
usb: gadget: r8a66597: convert to devm_platform_ioremap_resource_byname
Use devm_platform_ioremap_resource_byname() to simplify code
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1595404275-8449-5-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/udc/r8a66597-udc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c index 537094b485bf..896c1a016d55 100644 --- a/drivers/usb/gadget/udc/r8a66597-udc.c +++ b/drivers/usb/gadget/udc/r8a66597-udc.c @@ -1827,10 +1827,8 @@ static void nop_completion(struct usb_ep *ep, struct usb_request *r) static int r8a66597_sudmac_ioremap(struct r8a66597 *r8a66597, struct platform_device *pdev) { - struct resource *res; - - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "sudmac"); - r8a66597->sudmac_reg = devm_ioremap_resource(&pdev->dev, res); + r8a66597->sudmac_reg = + devm_platform_ioremap_resource_byname(pdev, "sudmac"); return PTR_ERR_OR_ZERO(r8a66597->sudmac_reg); } |