Skip to content

Commit

Permalink
edac: mpc85xx use resource_size instead of raw math
Browse files Browse the repository at this point in the history
Use resource_size() instead of arithmetic.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Acked-by: Dave Jiang <djiang@mvista.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Kumar Gala <galak@gate.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
H Hartley Sweeten authored and Linus Torvalds committed Mar 12, 2010
1 parent dcca7c3 commit 66ed3f7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/edac/mpc85xx_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,16 +239,15 @@ static int __devinit mpc85xx_pci_err_probe(struct of_device *op,
/* we only need the error registers */
r.start += 0xe00;

if (!devm_request_mem_region(&op->dev, r.start,
r.end - r.start + 1, pdata->name)) {
if (!devm_request_mem_region(&op->dev, r.start, resource_size(&r),
pdata->name)) {
printk(KERN_ERR "%s: Error while requesting mem region\n",
__func__);
res = -EBUSY;
goto err;
}

pdata->pci_vbase = devm_ioremap(&op->dev, r.start,
r.end - r.start + 1);
pdata->pci_vbase = devm_ioremap(&op->dev, r.start, resource_size(&r));
if (!pdata->pci_vbase) {
printk(KERN_ERR "%s: Unable to setup PCI err regs\n", __func__);
res = -ENOMEM;
Expand Down

0 comments on commit 66ed3f7

Please sign in to comment.