From: Felipe Balbi Date: Wed, 25 Jul 2012 12:05:28 +0000 (+0300) Subject: w1: omap-hdq: don't hardcode resource size X-Git-Tag: upstream/snapshot3+hdmi~6595^2~23^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be6ec64a1bb04d6c54f77e8e445e83ea8f1e17e1;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Acked-by: Evgeniy Polyakov Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index 38b0138..ee42797 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;