lkml.org 
[lkml]   [2023]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mfd: syscon: Use of_io_request_and_map() for IO mapping
Date
Use of_io_request_and_map() instead of of_iomap() so that the
region is reserved and protected, i.e reported in /proc/iomem
and not accessible from user side (CONFIG_IO_STRICT_DEVMEM).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
---
drivers/mfd/syscon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index bdb2ce7ff03b..7e6d4edda118 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -60,7 +60,7 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_clk)
goto err_map;
}

- base = of_iomap(np, 0);
+ base = of_io_request_and_map(np, 0, NULL);
if (!base) {
ret = -ENOMEM;
goto err_map;
--
2.34.1
\
 
 \ /
  Last update: 2023-03-27 01:09    [W:0.072 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site