summaryrefslogtreecommitdiffstats
path: root/drivers/w1
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2012-07-25 15:05:28 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-16 09:58:43 -0700
commitbe6ec64a1bb04d6c54f77e8e445e83ea8f1e17e1 (patch)
treebeb87edebca2228c0f052b9f621fc93f97fe7fe9 /drivers/w1
parent8c3db42fea94cc360446602d3d1a4f50ae98af16 (diff)
downloadblackbird-op-linux-be6ec64a1bb04d6c54f77e8e445e83ea8f1e17e1.tar.gz
blackbird-op-linux-be6ec64a1bb04d6c54f77e8e445e83ea8f1e17e1.zip
w1: omap-hdq: don't hardcode resource size
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> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/masters/omap_hdq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index 38b0138ce74d..ee427975bd82 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -566,7 +566,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;
OpenPOWER on IntegriCloud