]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
MIPS: RB532: Fix iomap resource size miscalculation.
authorRalf Baechle <ralf@linux-mips.org>
Thu, 12 May 2011 12:55:48 +0000 (13:55 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 18 May 2011 13:18:26 +0000 (14:18 +0100)
This is the MIPS portion of Joe Perches <joe@perches.com>'s
https://patchwork.linux-mips.org/patch/2172/ which seems to have been
lost in time and space.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/rb532/gpio.c

index 37de05d595e725ebdc59513181d3f43709ce1cb4..6c47dfeb7be326bf2dc4c5a7a1cbb1984b87efec 100644 (file)
@@ -185,7 +185,7 @@ int __init rb532_gpio_init(void)
        struct resource *r;
 
        r = rb532_gpio_reg0_res;
-       rb532_gpio_chip->regbase = ioremap_nocache(r->start, r->end - r->start);
+       rb532_gpio_chip->regbase = ioremap_nocache(r->start, resource_size(r));
 
        if (!rb532_gpio_chip->regbase) {
                printk(KERN_ERR "rb532: cannot remap GPIO register 0\n");