提交 e019ef0c 编写于 作者: H H Hartley Sweeten 提交者: Jens Axboe

drivers/block/mg_disk.c: use resource_size()

Use resource_size() for ioremap.

The ioremap appears to be passing the incorrect size for the platform
resource.  Unfortunately, I can't locate a user in mainline to verify
this.  Using resource_size should be the correct fix.
Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Nunsik Kim <donari75@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 df9dc83d
......@@ -860,7 +860,7 @@ static int mg_probe(struct platform_device *plat_dev)
err = -EINVAL;
goto probe_err_2;
}
host->dev_base = ioremap(rsc->start , rsc->end + 1);
host->dev_base = ioremap(rsc->start, resource_size(rsc));
if (!host->dev_base) {
printk(KERN_ERR "%s:%d ioremap fail\n",
__func__, __LINE__);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册