lkml.org 
[lkml]   [2012]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/6] w1: omap-hdq: don't hardcode resource size
Date
we have the helpful resource_size() macro to
calculate the size of the memory resource for
us, let's use it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
drivers/w1/masters/omap_hdq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index 46e1f6f..404a4de 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -568,7 +568,7 @@ static int __devinit omap_hdq_probe(struct platform_device *pdev)
goto err_resource;
}

- hdq_data->hdq_base = ioremap(res->start, SZ_4K);
+ hdq_data->hdq_base = ioremap(res->start, resource_size(res));
if (!hdq_data->hdq_base) {
dev_dbg(&pdev->dev, "ioremap failed\n");
ret = -EINVAL;
--
1.7.11


\
 
 \ /
  Last update: 2012-07-25 14:42    [W:0.088 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site