diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-06-16 12:45:19 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-17 15:26:40 +0200 |
commit | e56621580755d40551f3fae5766907ae1c24d1fc (patch) | |
tree | 446cb13748a49a551a4aea92d101c18b89ec8f08 /drivers/usb | |
parent | ec03554f980f917e0491aa8532aabedc9c080639 (diff) |
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.c | 3 |
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, ®s); if (IS_ERR(tegra->regs)) return PTR_ERR(tegra->regs); |