From 905aa0ae91798feb4e12d6237496d269dc2f4962 Mon Sep 17 00:00:00 2001 From: hartleys Date: Mon, 14 Dec 2009 22:22:25 +0000 Subject: [PATCH] spi: atmel_spi.c: use resource_size() Signed-off-by: H Hartley Sweeten Cc: Haavard Skinnemoen Signed-off-by: Grant Likely --- drivers/spi/atmel_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index 8ce70cbdbb96..d21c24eaf0a9 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c @@ -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; -- 2.20.1