projects
/
profile
/
common
/
kernel-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc05ea0
)
dmaengine: mpc512x: Use resource_size
author
Tobias Klauser
<tklauser@distanz.ch>
Thu, 6 May 2010 09:58:55 +0000
(11:58 +0200)
committer
Dan Williams
<dan.j.williams@intel.com>
Mon, 17 May 2010 18:13:51 +0000
(11:13 -0700)
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>
drivers/dma/mpc512x_dma.c
patch
|
blob
|
history
diff --git
a/drivers/dma/mpc512x_dma.c
b/drivers/dma/mpc512x_dma.c
index
7a750b9
..
e41fb8b
100644
(file)
--- 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,
}
regs_start = res.start;
- regs_size = res
.end - res.start + 1
;
+ regs_size = res
ource_size(&res)
;
if (!devm_request_mem_region(dev, regs_start, regs_size, DRV_NAME)) {
dev_err(dev, "Error requesting memory region!\n");