mfd: syscon: Use of_iomap() instead of ioremap()
authorHector Martin <marcan@marcan.st>
Mon, 23 Aug 2021 14:31:22 +0000 (23:31 +0900)
committerLee Jones <lee.jones@linaro.org>
Tue, 7 Sep 2021 07:34:08 +0000 (08:34 +0100)
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>
drivers/mfd/syscon.c

index 765c021..191fdb8 100644 (file)
@@ -60,7 +60,7 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_clk)
                goto err_map;
        }
 
                goto err_map;
        }
 
-       base = ioremap(res.start, resource_size(&res));
+       base = of_iomap(np, 0);
        if (!base) {
                ret = -ENOMEM;
                goto err_map;
        if (!base) {
                ret = -ENOMEM;
                goto err_map;