summaryrefslogtreecommitdiffstats
path: root/drivers/soc/tegra
diff options
context:
space:
mode:
authorYe Xingchen <ye.xingchen@zte.com.cn>2023-02-15 17:18:03 +0800
committerThierry Reding <treding@nvidia.com>2023-04-05 14:59:09 +0200
commit42c67aa26271fd3c12947dc3983051ff5c0d3a73 (patch)
tree39c5d628347c8bb717abc5044d45fdcb09626cd5 /drivers/soc/tegra
parentc299a2e6bf944b4218acc194a1cdf500b34e80aa (diff)
downloadlinux-42c67aa26271fd3c12947dc3983051ff5c0d3a73.tar.gz
linux-42c67aa26271fd3c12947dc3983051ff5c0d3a73.tar.bz2
linux-42c67aa26271fd3c12947dc3983051ff5c0d3a73.zip
soc/tegra: flowctrl: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/soc/tegra')
-rw-r--r--drivers/soc/tegra/flowctrl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/soc/tegra/flowctrl.c b/drivers/soc/tegra/flowctrl.c
index 5db919d96aba..221202db3313 100644
--- a/drivers/soc/tegra/flowctrl.c
+++ b/drivers/soc/tegra/flowctrl.c
@@ -156,10 +156,8 @@ void flowctrl_cpu_suspend_exit(unsigned int cpuid)
static int tegra_flowctrl_probe(struct platform_device *pdev)
{
void __iomem *base = tegra_flowctrl_base;
- struct resource *res;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- tegra_flowctrl_base = devm_ioremap_resource(&pdev->dev, res);
+ tegra_flowctrl_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
if (IS_ERR(tegra_flowctrl_base))
return PTR_ERR(tegra_flowctrl_base);