aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2009-06-22 21:08:04 +0200
committerEric Miao <eric.y.miao@gmail.com>2009-09-10 18:49:29 +0800
commit53eff4175f1eb25f97425b1526774fecb81444d4 (patch)
treeb74d369c89eac7865065d6a25ea066d387d016a2
parentd294948c2ce4e1c85f452154469752cc9b8e876d (diff)
[ARM] pxafb: use resource_size() function
Cleanup only, no function change. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r--drivers/video/pxafb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 6506117c134..0a301003d92 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -2091,14 +2091,14 @@ static int __devinit pxafb_probe(struct platform_device *dev)
goto failed_fbi;
}
- r = request_mem_region(r->start, r->end - r->start + 1, dev->name);
+ r = request_mem_region(r->start, resource_size(r), dev->name);
if (r == NULL) {
dev_err(&dev->dev, "failed to request I/O memory\n");
ret = -EBUSY;
goto failed_fbi;
}
- fbi->mmio_base = ioremap(r->start, r->end - r->start + 1);
+ fbi->mmio_base = ioremap(r->start, resource_size(r));
if (fbi->mmio_base == NULL) {
dev_err(&dev->dev, "failed to map I/O memory\n");
ret = -EBUSY;
@@ -2197,7 +2197,7 @@ failed_free_dma:
failed_free_io:
iounmap(fbi->mmio_base);
failed_free_res:
- release_mem_region(r->start, r->end - r->start + 1);
+ release_mem_region(r->start, resource_size(r));
failed_fbi:
clk_put(fbi->clk);
platform_set_drvdata(dev, NULL);
@@ -2237,7 +2237,7 @@ static int __devexit pxafb_remove(struct platform_device *dev)
iounmap(fbi->mmio_base);
r = platform_get_resource(dev, IORESOURCE_MEM, 0);
- release_mem_region(r->start, r->end - r->start + 1);
+ release_mem_region(r->start, resource_size(r));
clk_put(fbi->clk);
kfree(fbi);