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>
This commit is contained in:
parent
db123bea96
commit
c946226834
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user