aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2010-05-06 05:58:55 -0400
committerDan Williams <dan.j.williams@intel.com>2010-05-17 14:13:51 -0400
commit8381fc35244dbdf58cfc49e04e0d7c3498c8aa03 (patch)
treedc6e2deb84db53242c4904b295ded5ef1294ad3d
parentcc05ea0cd63437da2033b3ce6e033b1f1aaaf640 (diff)
dmaengine: mpc512x: Use resource_size
Use the resource_size function instead of manually calculating the resource size. This reduces the chance of introducing off-by-one errors. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r--drivers/dma/mpc512x_dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c
index 7a750b95303c..e41fb8b671d3 100644
--- a/drivers/dma/mpc512x_dma.c
+++ b/drivers/dma/mpc512x_dma.c
@@ -657,7 +657,7 @@ static int __devinit mpc_dma_probe(struct of_device *op,
657 } 657 }
658 658
659 regs_start = res.start; 659 regs_start = res.start;
660 regs_size = res.end - res.start + 1; 660 regs_size = resource_size(&res);
661 661
662 if (!devm_request_mem_region(dev, regs_start, regs_size, DRV_NAME)) { 662 if (!devm_request_mem_region(dev, regs_start, regs_size, DRV_NAME)) {
663 dev_err(dev, "Error requesting memory region!\n"); 663 dev_err(dev, "Error requesting memory region!\n");