Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus
[pandora-kernel.git] / arch / powerpc / platforms / powermac / nvram.c
index b1cdcf9..695443b 100644 (file)
@@ -580,10 +580,10 @@ int __init pmac_nvram_init(void)
        /* Try to obtain an address */
        if (of_address_to_resource(dp, 0, &r1) == 0) {
                nvram_naddrs = 1;
-               s1 = (r1.end - r1.start) + 1;
+               s1 = resource_size(&r1);
                if (of_address_to_resource(dp, 1, &r2) == 0) {
                        nvram_naddrs = 2;
-                       s2 = (r2.end - r2.start) + 1;
+                       s2 = resource_size(&r2);
                }
        }