rtc-vr41xx: use resource_size()
authorYoichi Yuasa <yuasa@linux-mips.org>
Wed, 16 Dec 2009 00:46:15 +0000 (16:46 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2009 15:20:00 +0000 (07:20 -0800)
Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-vr41xx.c

index fadddac1e5a44d5658536828c62db7122474a49b..c3244244e8cfd7a508963cdcc9e4d16fba57a78c 100644 (file)
@@ -327,7 +327,7 @@ static int __devinit rtc_probe(struct platform_device *pdev)
        if (!res)
                return -EBUSY;
 
-       rtc1_base = ioremap(res->start, res->end - res->start + 1);
+       rtc1_base = ioremap(res->start, resource_size(res));
        if (!rtc1_base)
                return -EBUSY;
 
@@ -337,7 +337,7 @@ static int __devinit rtc_probe(struct platform_device *pdev)
                goto err_rtc1_iounmap;
        }
 
-       rtc2_base = ioremap(res->start, res->end - res->start + 1);
+       rtc2_base = ioremap(res->start, resource_size(res));
        if (!rtc2_base) {
                retval = -EBUSY;
                goto err_rtc1_iounmap;