summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2020-07-22 15:51:11 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-29 16:49:37 +0200
commit7e8b59c1fc6bf78b8117efd8d354bcb99efed2ea (patch)
treeaff5bf553cfde3f7ce7b1f203d3f79a6650b2741 /drivers/usb
parent6ce7b97cfae2264687b29ae84f63fa3b57282f29 (diff)
usb: cdns3: convert to devm_platform_ioremap_resource_byname
Use devm_platform_ioremap_resource_byname() to simplify code Cc: Peter Chen <peter.chen@nxp.com> Reviewed-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1595404275-8449-3-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/cdns3/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index 72885c5edb09..5c1586ec7824 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -423,8 +423,7 @@ static int cdns3_probe(struct platform_device *pdev)
if (cdns->dev_irq < 0)
dev_err(dev, "couldn't get peripheral irq\n");
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dev");
- regs = devm_ioremap_resource(dev, res);
+ regs = devm_platform_ioremap_resource_byname(pdev, "dev");
if (IS_ERR(regs))
return PTR_ERR(regs);
cdns->dev_regs = regs;