mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
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>
This commit is contained in:
parent
cc05ea0cd6
commit
8381fc3524
1 changed files with 1 additions and 1 deletions
|
@ -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 = resource_size(&res);
|
||||
|
||||
if (!devm_request_mem_region(dev, regs_start, regs_size, DRV_NAME)) {
|
||||
dev_err(dev, "Error requesting memory region!\n");
|
||||
|
|
Loading…
Reference in a new issue