spi: atmel_spi.c: use resource_size()
authorhartleys <hartleys@visionengravers.com>
Mon, 14 Dec 2009 22:22:25 +0000 (22:22 +0000)
committerGrant Likely <grant.likely@secretlab.ca>
Thu, 17 Dec 2009 15:59:06 +0000 (08:59 -0700)
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/atmel_spi.c

index 8ce70cbdbb969275da843239763f5c94ad52064c..d21c24eaf0a95537baae7f22e783bff8658aa816 100644 (file)
@@ -788,7 +788,7 @@ static int __init atmel_spi_probe(struct platform_device *pdev)
        spin_lock_init(&as->lock);
        INIT_LIST_HEAD(&as->queue);
        as->pdev = pdev;
-       as->regs = ioremap(regs->start, (regs->end - regs->start) + 1);
+       as->regs = ioremap(regs->start, resource_size(regs));
        if (!as->regs)
                goto out_free_buffer;
        as->irq = irq;