diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2009-12-14 16:13:13 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-12-31 19:52:46 +0000 |
commit | d8bc55553c416c877267c1efd65b099164acbe3f (patch) | |
tree | ee6c65fd350ee38a37fa64df6578b695eb5293be /drivers/mtd/nand/davinci_nand.c | |
parent | 440d4f9fb62dad0d5ed1635d099cedaa7a25d96d (diff) | |
download | linux-d8bc55553c416c877267c1efd65b099164acbe3f.tar.gz linux-d8bc55553c416c877267c1efd65b099164acbe3f.tar.bz2 linux-d8bc55553c416c877267c1efd65b099164acbe3f.zip |
mtd: davinci_nand.c: use resource_size()
The ioremap'ed sizes are off by 1; use resource_size() for correct value.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/davinci_nand.c')
-rw-r--r-- | drivers/mtd/nand/davinci_nand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index fe3eba87de40..e2eeaf1e51a3 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c @@ -566,8 +566,8 @@ static int __init nand_davinci_probe(struct platform_device *pdev) goto err_nomem; } - vaddr = ioremap(res1->start, res1->end - res1->start); - base = ioremap(res2->start, res2->end - res2->start); + vaddr = ioremap(res1->start, resource_size(res1)); + base = ioremap(res2->start, resource_size(res2)); if (!vaddr || !base) { dev_err(&pdev->dev, "ioremap failed\n"); ret = -EINVAL; |