aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-06-16 12:45:19 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-17 15:26:40 +0200
commite56621580755d40551f3fae5766907ae1c24d1fc (patch)
tree446cb13748a49a551a4aea92d101c18b89ec8f08 /drivers/usb
parentusb: host: xhci-tegra: Add missing of_node_put() in tegra_xusb_probe() (diff)
downloadlinux-dev-e56621580755d40551f3fae5766907ae1c24d1fc.tar.xz
linux-dev-e56621580755d40551f3fae5766907ae1c24d1fc.zip
usb: host: xhci-tegra: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210616044519.2183826-3-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/xhci-tegra.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index fa275da649ad..4c8c60ba817a 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -1426,8 +1426,7 @@ static int tegra_xusb_probe(struct platform_device *pdev)
if (err < 0)
return err;
- regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- tegra->regs = devm_ioremap_resource(&pdev->dev, regs);
+ tegra->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &regs);
if (IS_ERR(tegra->regs))
return PTR_ERR(tegra->regs);