Commit 905aa0ae authored by hartleys's avatar hartleys Committed by Grant Likely

spi: atmel_spi.c: use resource_size()

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 230d42d4
...@@ -788,7 +788,7 @@ static int __init atmel_spi_probe(struct platform_device *pdev) ...@@ -788,7 +788,7 @@ static int __init atmel_spi_probe(struct platform_device *pdev)
spin_lock_init(&as->lock); spin_lock_init(&as->lock);
INIT_LIST_HEAD(&as->queue); INIT_LIST_HEAD(&as->queue);
as->pdev = pdev; as->pdev = pdev;
as->regs = ioremap(regs->start, (regs->end - regs->start) + 1); as->regs = ioremap(regs->start, resource_size(regs));
if (!as->regs) if (!as->regs)
goto out_free_buffer; goto out_free_buffer;
as->irq = irq; as->irq = irq;
......
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