Skip to contentSkip to conversation

mfd/syscon: Use of_iomap() instead of ioremap()

PATCH Applied Hector Martin 3 participants 3 messages Aug 23, 2021 – Sep 6, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd/syscon: Use of_iomap() instead of ioremap()

This automatically selects between ioremap() and ioremap_np() on platforms that require it, such as Apple SoCs.

---
 drivers/mfd/syscon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/syscon.c +1 -1
index 765c0210cb52..191fdb87c424 100644
@@ -60,7 +60,7 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_clk)
 		goto err_map;
 	}
 
-	base = ioremap(res.start, resource_size(&res));
+	base = of_iomap(np, 0);
 	if (!base) {
 		ret = -ENOMEM;
 		goto err_map;
Signature · 1 line
2.32.0
Applied
#2 lore raw
In reply to Hector Martin
Quoted 7 lines · Hector Martin

This automatically selects between ioremap() and ioremap_np() on platforms that require it, such as Apple SoCs.

---
 drivers/mfd/syscon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog