diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2009-12-22 03:27:49 +0300 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-12-22 11:12:48 +0300 |
commit | e019ef0c4f11a0acb79b89fb1e09c72197b42bbe (patch) | |
tree | b46e380ed4de082ddf2843bf72b9186cef24bb3a /drivers/block/mg_disk.c | |
parent | df9dc83d193959f990c981787279e8541fe9df8c (diff) | |
download | linux-e019ef0c4f11a0acb79b89fb1e09c72197b42bbe.tar.xz |
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: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: unsik Kim <donari75@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/mg_disk.c')
-rw-r--r-- | drivers/block/mg_disk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c index e0339aaa1815..02b2583df7fc 100644 --- a/drivers/block/mg_disk.c +++ b/drivers/block/mg_disk.c @@ -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__); |