spi: spi_mpc8xxx.c: use resource_size()
authorhartleys <hartleys@visionengravers.com>
Mon, 14 Dec 2009 22:37:15 +0000 (22:37 +0000)
committerGrant Likely <grant.likely@secretlab.ca>
Thu, 17 Dec 2009 16:00:02 +0000 (09:00 -0700)
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi_mpc8xxx.c

index 1d98be9..797226c 100644 (file)
@@ -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;