gpio/vr41xx: Convert use of struct resource to resource_size(ptr)
authorJoe Perches <joe@perches.com>
Sat, 11 Jun 2011 01:16:15 +0000 (18:16 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Sat, 11 Jun 2011 05:37:10 +0000 (23:37 -0600)
Remove miscellaneous use of direct calculation by using resource_size().

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/gpio/gpio-vr41xx.c

index a365be0..98723cb 100644 (file)
@@ -518,7 +518,7 @@ static int __devinit giu_probe(struct platform_device *pdev)
        if (!res)
                return -EBUSY;
 
-       giu_base = ioremap(res->start, res->end - res->start + 1);
+       giu_base = ioremap(res->start, resource_size(res));
        if (!giu_base)
                return -ENOMEM;