summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2009-12-12 07:24:33 +0300
committerDan Williams <dan.j.williams@intel.com>2009-12-12 07:24:33 +0300
commit2e032b62c4c8560d6416ad3cc925cfc2a5eafb07 (patch)
tree8700a84d68eebf61def8dde6cf4bd5d76a13c5fb /drivers/dma
parenta88f6667078412e5eff37ead68a043ee0ec9f1da (diff)
downloadlinux-2e032b62c4c8560d6416ad3cc925cfc2a5eafb07.tar.xz
iop-adma.c: use resource_size()
The size of the requested and ioremaped memory is off by 1. Use resource_size() to get the correct value. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/iop-adma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c
index 645ca8d54ec4..ca6e6a0cb793 100644
--- a/drivers/dma/iop-adma.c
+++ b/drivers/dma/iop-adma.c
@@ -1470,7 +1470,7 @@ static int __devinit iop_adma_probe(struct platform_device *pdev)
return -ENODEV;
if (!devm_request_mem_region(&pdev->dev, res->start,
- res->end - res->start, pdev->name))
+ resource_size(res), pdev->name))
return -EBUSY;
adev = kzalloc(sizeof(*adev), GFP_KERNEL);
@@ -1542,7 +1542,7 @@ static int __devinit iop_adma_probe(struct platform_device *pdev)
iop_chan->device = adev;
iop_chan->mmr_base = devm_ioremap(&pdev->dev, res->start,
- res->end - res->start);
+ resource_size(res));
if (!iop_chan->mmr_base) {
ret = -ENOMEM;
goto err_free_iop_chan;