Skip to content

Commit 9d4ee5b

Browse files
Chunfeng Yungregkh
authored andcommitted
usb: gadget: tegra-xudc: convert to devm_platform_ioremap_resource_byname
Use devm_platform_ioremap_resource_byname() to simplify code Cc: Nagarjuna Kristam <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c946226 commit 9d4ee5b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/usb/gadget/udc/tegra-xudc.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3750,15 +3750,12 @@ static int tegra_xudc_probe(struct platform_device *pdev)
37503750
return PTR_ERR(xudc->base);
37513751
xudc->phys_base = res->start;
37523752

3753-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fpci");
3754-
xudc->fpci = devm_ioremap_resource(&pdev->dev, res);
3753+
xudc->fpci = devm_platform_ioremap_resource_byname(pdev, "fpci");
37553754
if (IS_ERR(xudc->fpci))
37563755
return PTR_ERR(xudc->fpci);
37573756

37583757
if (xudc->soc->has_ipfs) {
3759-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
3760-
"ipfs");
3761-
xudc->ipfs = devm_ioremap_resource(&pdev->dev, res);
3758+
xudc->ipfs = devm_platform_ioremap_resource_byname(pdev, "ipfs");
37623759
if (IS_ERR(xudc->ipfs))
37633760
return PTR_ERR(xudc->ipfs);
37643761
}

0 commit comments

Comments
 (0)