[<prev] [next>] [day] [month] [year] [list]
Message-ID: <BD79186B4FD85F4B8E60E381CAEE19090200EA75@mi8nycmail19.Mi8.com>
Date: Mon, 14 Dec 2009 17:22:25 -0500
From: "H Hartley Sweeten" <hartleys@...ionengravers.com>
To: "kernel list" <linux-kernel@...r.kernel.org>,
<spi-devel-general@...ts.sourceforge.net>
Cc: <haavard.skinnemoen@...el.com>
Subject: [PATCH] atmel_spi.c: use resource_size()
Use resource_size().
Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
Cc: Haavard Skinnemoen <hskinnemoen@...el.com>
---
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index f5b3fdb..b4fe99a 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists