Skip to content

Commit

Permalink
spi: atmel_spi.c: use resource_size()
Browse files Browse the repository at this point in the history
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
hartleys authored and Grant Likely committed Dec 17, 2009
1 parent 230d42d commit 905aa0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/atmel_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 905aa0a

Please sign in to comment.