From 82de76513eeb35b93a591497dcff217f2ec76041 Mon Sep 17 00:00:00 2001 From: hartleys Date: Mon, 14 Dec 2009 22:37:15 +0000 Subject: spi: spi_mpc8xxx.c: use resource_size() Signed-off-by: H Hartley Sweeten Cc: David Brownell Cc: Kumar Gala Signed-off-by: Grant Likely --- drivers/spi/spi_mpc8xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c index 1d98be9b194..797226cb7ef 100644 --- a/drivers/spi/spi_mpc8xxx.c +++ b/drivers/spi/spi_mpc8xxx.c @@ -566,7 +566,7 @@ mpc8xxx_spi_probe(struct device *dev, struct resource *mem, unsigned int irq) init_completion(&mpc8xxx_spi->done); - mpc8xxx_spi->base = ioremap(mem->start, mem->end - mem->start + 1); + mpc8xxx_spi->base = ioremap(mem->start, resource_size(mem)); if (mpc8xxx_spi->base == NULL) { ret = -ENOMEM; goto put_master; -- cgit v1.2.3