提交 8381fc35 编写于 作者: T Tobias Klauser 提交者: Dan Williams

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: NTobias Klauser <tklauser@distanz.ch>
Signed-off-by: NDan Williams <dan.j.williams@intel.com>
上级 cc05ea0c
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册