提交 4716eaf2 编写于 作者: H H Hartley Sweeten 提交者: Jeff Garzik

pata_octeon_cf: use resource_size(), to fix resource sizing bug

It appears the size for cs1 is calculated using the wrong resource.
Use the function resource_size to get the correct value.
Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 0cdd6eb7
...@@ -853,7 +853,7 @@ static int __devinit octeon_cf_probe(struct platform_device *pdev) ...@@ -853,7 +853,7 @@ static int __devinit octeon_cf_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
cs1 = devm_ioremap_nocache(&pdev->dev, res_cs1->start, cs1 = devm_ioremap_nocache(&pdev->dev, res_cs1->start,
res_cs0->end - res_cs1->start + 1); resource_size(res_cs1));
if (!cs1) if (!cs1)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册