Skip to contentSkip to conversation

soc/tegra: flowctrl: Use devm_platform_get_and_ioremap_resource()

PATCH Applied [email protected] 2 participants 2 messages Feb 15, 2023 – Apr 5, 2023 Tegra architecture support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc/tegra: flowctrl: Use devm_platform_get_and_ioremap_resource()

From: Ye Xingchen <[email protected]>

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.

---
 drivers/soc/tegra/flowctrl.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/soc/tegra/flowctrl.c +1 -3
index 5db919d96aba..221202db3313 100644
@@ -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);
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 10 lines · On Wed, Feb 15, 2023 at 05:18:03PM +0800, [email protected] wrote:

From: Ye Xingchen <[email protected]>

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.

---
 drivers/soc/tegra/flowctrl.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Applied, thanks.

Thierry