Commit 66ed3f75 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Linus Torvalds

edac: mpc85xx use resource_size instead of raw math

Use resource_size() instead of arithmetic.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarDoug Thompson <dougthompson@xmission.com>
Acked-by: default avatarDave Jiang <djiang@mvista.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Kumar Gala <galak@gate.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent dcca7c3d
...@@ -239,16 +239,15 @@ static int __devinit mpc85xx_pci_err_probe(struct of_device *op, ...@@ -239,16 +239,15 @@ static int __devinit mpc85xx_pci_err_probe(struct of_device *op,
/* we only need the error registers */ /* we only need the error registers */
r.start += 0xe00; r.start += 0xe00;
if (!devm_request_mem_region(&op->dev, r.start, if (!devm_request_mem_region(&op->dev, r.start, resource_size(&r),
r.end - r.start + 1, pdata->name)) { pdata->name)) {
printk(KERN_ERR "%s: Error while requesting mem region\n", printk(KERN_ERR "%s: Error while requesting mem region\n",
__func__); __func__);
res = -EBUSY; res = -EBUSY;
goto err; goto err;
} }
pdata->pci_vbase = devm_ioremap(&op->dev, r.start, pdata->pci_vbase = devm_ioremap(&op->dev, r.start, resource_size(&r));
r.end - r.start + 1);
if (!pdata->pci_vbase) { if (!pdata->pci_vbase) {
printk(KERN_ERR "%s: Unable to setup PCI err regs\n", __func__); printk(KERN_ERR "%s: Unable to setup PCI err regs\n", __func__);
res = -ENOMEM; res = -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment