提交 d7544424 编写于 作者: W Wei Yongjun 提交者: Scott Wood

soc/fsl/bman: Use resource_size instead of computation

Use resource_size function on resource object
instead of explicit computation.

Generated by: scripts/coccinelle/api/resource_size.cocci
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NScott Wood <oss@buserror.net>
上级 c9492b4b
...@@ -181,8 +181,7 @@ static int fsl_bman_probe(struct platform_device *pdev) ...@@ -181,8 +181,7 @@ static int fsl_bman_probe(struct platform_device *pdev)
node->full_name); node->full_name);
return -ENXIO; return -ENXIO;
} }
bm_ccsr_start = devm_ioremap(dev, res->start, bm_ccsr_start = devm_ioremap(dev, res->start, resource_size(res));
res->end - res->start + 1);
if (!bm_ccsr_start) if (!bm_ccsr_start)
return -ENXIO; return -ENXIO;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册