提交 be6ec64a 编写于 作者: F Felipe Balbi 提交者: Greg Kroah-Hartman

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: NFelipe Balbi <balbi@ti.com>
Acked-by: NEvgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 8c3db42f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册