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.

Signed-off-by: Hector Martin <marcan@marcan.st>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
Hector Martin 2021-08-23 23:31:22 +09:00 committed by Lee Jones
parent c2f24933a1
commit 452d074139
1 changed files with 1 additions and 1 deletions

View File

@ -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;