Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457477

[PATCH] mfd: syscon: Make use of of_iomap

From Andrey Smirnov <andrew.smirnov@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] mfd: syscon: Make use of of_iomap
Date 2016-08-07 19:10 +0200
Message-ID <s3zKi-6Be-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Use of_iomap instead of explicitly calling of_address_to_resource() and
ioremap().

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/mfd/syscon.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 2f2225e..55b883d 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -59,12 +59,7 @@ static struct syscon *of_syscon_register(struct device_node *np)
 	if (!syscon)
 		return ERR_PTR(-ENOMEM);
 
-	if (of_address_to_resource(np, 0, &res)) {
-		ret = -ENOMEM;
-		goto err_map;
-	}
-
-	base = ioremap(res.start, resource_size(&res));
+	base = of_iomap(np, 0);
 	if (!base) {
 		ret = -ENOMEM;
 		goto err_map;
-- 
2.5.5

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] mfd: syscon: Make use of of_iomap Andrey Smirnov <andrew.smirnov@gmail.com> - 2016-08-07 19:10 +0200
  Re: [PATCH] mfd: syscon: Make use of of_iomap Arnd Bergmann <arnd@arndb.de> - 2016-08-07 22:10 +0200
  Re: [PATCH] mfd: syscon: Make use of of_iomap Lee Jones <lee.jones@linaro.org> - 2016-08-09 15:00 +0200

csiph-web