diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2020-07-22 10:51:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-29 17:49:38 +0300 |
commit | 9d4ee5bd8298a2a8c2487c4d4a105fe9ddef1d81 (patch) | |
tree | 24f0f49c439a327b4a6125d1cf232f91e090d342 /drivers/usb | |
parent | c94622683443a8eab17df07b9124304f8c40c01c (diff) | |
download | linux-9d4ee5bd8298a2a8c2487c4d4a105fe9ddef1d81.tar.xz |
usb: gadget: tegra-xudc: convert to devm_platform_ioremap_resource_byname
Use devm_platform_ioremap_resource_byname() to simplify code
Cc: Nagarjuna Kristam <nkristam@nvidia.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1595404275-8449-6-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/tegra-xudc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c index 404f77806c6a..d6ff68c06911 100644 --- a/drivers/usb/gadget/udc/tegra-xudc.c +++ b/drivers/usb/gadget/udc/tegra-xudc.c @@ -3750,15 +3750,12 @@ static int tegra_xudc_probe(struct platform_device *pdev) return PTR_ERR(xudc->base); xudc->phys_base = res->start; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fpci"); - xudc->fpci = devm_ioremap_resource(&pdev->dev, res); + xudc->fpci = devm_platform_ioremap_resource_byname(pdev, "fpci"); if (IS_ERR(xudc->fpci)) return PTR_ERR(xudc->fpci); if (xudc->soc->has_ipfs) { - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "ipfs"); - xudc->ipfs = devm_ioremap_resource(&pdev->dev, res); + xudc->ipfs = devm_platform_ioremap_resource_byname(pdev, "ipfs"); if (IS_ERR(xudc->ipfs)) return PTR_ERR(xudc->ipfs); } |