Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
[linux-3.10.git] / drivers / net / macb.c
index dcf6011..0fcdc25 100644 (file)
@@ -1172,7 +1172,7 @@ static int __init macb_probe(struct platform_device *pdev)
        clk_enable(bp->hclk);
 #endif
 
-       bp->regs = ioremap(regs->start, regs->end - regs->start + 1);
+       bp->regs = ioremap(regs->start, resource_size(regs));
        if (!bp->regs) {
                dev_err(&pdev->dev, "failed to map registers, aborting.\n");
                err = -ENOMEM;