mfd: Use resource_size() for t7l66xb
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 5 Jan 2010 18:58:34 +0000 (19:58 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 7 Mar 2010 21:16:53 +0000 (22:16 +0100)
Use resource_size() for ioremap.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/t7l66xb.c

index bcf4687d4af5686132c5a155027b595588cf8390..e0bbddd7aac254b56af2edaaa64c834e5ab7bc1c 100644 (file)
@@ -360,7 +360,7 @@ static int t7l66xb_probe(struct platform_device *dev)
        if (ret)
                goto err_request_scr;
 
-       t7l66xb->scr = ioremap(rscr->start, rscr->end - rscr->start + 1);
+       t7l66xb->scr = ioremap(rscr->start, resource_size(rscr));
        if (!t7l66xb->scr) {
                ret = -ENOMEM;
                goto err_ioremap;