<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From 655fe2533ac05323a07c19ba079bf2064e7741af Mon Sep 17 00:00:00 2001
From: Rob Herring &lt;robh@kernel.org&gt;
Date: Sun, 19 Mar 2023 11:32:31 -0500
Subject: [PATCH 20/42] thermal/drivers/mediatek: Use of_address_to_resource()

Replace of_get_address() and of_translate_address() calls with single
call to of_address_to_resource().

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20230319163231.226738-1-robh@kernel.org
---
 drivers/thermal/mediatek/auxadc_thermal.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

--- a/drivers/thermal/mediatek/auxadc_thermal.c
+++ b/drivers/thermal/mediatek/auxadc_thermal.c
@@ -979,14 +979,12 @@ static void mtk_thermal_init_bank(struct
 
 static u64 of_get_phys_base(struct device_node *np)
 {
-	u64 size64;
-	const __be32 *regaddr_p;
+	struct resource res;
 
-	regaddr_p = of_get_address(np, 0, &amp;size64, NULL);
-	if (!regaddr_p)
+	if (of_address_to_resource(np, 0, &amp;res))
 		return OF_BAD_ADDR;
 
-	return of_translate_address(np, regaddr_p);
+	return res.start;
 }
 
 static int mtk_thermal_extract_efuse_v1(struct mtk_thermal *mt, u32 *buf)
</pre></body></html>