Skip to content

Commit

Permalink
w1: omap-hdq: don't hardcode resource size
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Aug 16, 2012
1 parent 8c3db42 commit be6ec64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/w1/masters/omap_hdq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit be6ec64

Please sign in to comment.