public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: syscon: Make use of of_iomap
@ 2016-08-07 17:08 Andrey Smirnov
  2016-08-07 20:01 ` Arnd Bergmann
  2016-08-09 12:57 ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Andrey Smirnov @ 2016-08-07 17:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrey Smirnov, Lee Jones, Arnd Bergmann

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-09 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-07 17:08 [PATCH] mfd: syscon: Make use of of_iomap Andrey Smirnov
2016-08-07 20:01 ` Arnd Bergmann
2016-08-09 12:57 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox