treewide: Convert uses of struct resource to resource_size(ptr)
[deliverable/linux.git] / drivers / tty / serial / bfin_5xx.c
index 9b1ff2b6bb3703e98fcf7b9cd758d1b923ce5fd0..ff6979181ac5bf1b0dd3464e3c6a837062776586 100644 (file)
@@ -1304,8 +1304,7 @@ static int bfin_serial_probe(struct platform_device *pdev)
                        goto out_error_free_peripherals;
                }
 
-               uart->port.membase = ioremap(res->start,
-                       res->end - res->start);
+               uart->port.membase = ioremap(res->start, resource_size(res));
                if (!uart->port.membase) {
                        dev_err(&pdev->dev, "Cannot map uart IO\n");
                        ret = -ENXIO;
@@ -1483,7 +1482,7 @@ static int bfin_earlyprintk_probe(struct platform_device *pdev)
        }
 
        bfin_earlyprintk_port.port.membase = ioremap(res->start,
-                       res->end - res->start);
+                                                    resource_size(res));
        if (!bfin_earlyprintk_port.port.membase) {
                dev_err(&pdev->dev, "Cannot map uart IO\n");
                ret = -ENXIO;
This page took 0.026848 seconds and 5 git commands to generate.