aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMike Rapoport <mike@compulab.co.il>2009-02-17 06:54:45 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-03-20 14:37:16 -0400
commitb2ed3680553b451e5c45064de26ea8fa5201c6d4 (patch)
tree1570c4b8e76bf1b143cc23b2f4170ac1694c5445 /drivers
parente7f521636a2d6b1a012f98f6ec16898c5d6f1543 (diff)
[MTD] [NAND] pxa3xx_nand: use resource_size instead of 'r->end - r->start + 1'
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/pxa3xx_nand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index cc55cbc2b308..ffa960baa7e7 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1118,14 +1118,14 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
1118 goto fail_put_clk; 1118 goto fail_put_clk;
1119 } 1119 }
1120 1120
1121 r = request_mem_region(r->start, r->end - r->start + 1, pdev->name); 1121 r = request_mem_region(r->start, resource_size(r), pdev->name);
1122 if (r == NULL) { 1122 if (r == NULL) {
1123 dev_err(&pdev->dev, "failed to request memory resource\n"); 1123 dev_err(&pdev->dev, "failed to request memory resource\n");
1124 ret = -EBUSY; 1124 ret = -EBUSY;
1125 goto fail_put_clk; 1125 goto fail_put_clk;
1126 } 1126 }
1127 1127
1128 info->mmio_base = ioremap(r->start, r->end - r->start + 1); 1128 info->mmio_base = ioremap(r->start, resource_size(r));
1129 if (info->mmio_base == NULL) { 1129 if (info->mmio_base == NULL) {
1130 dev_err(&pdev->dev, "ioremap() failed\n"); 1130 dev_err(&pdev->dev, "ioremap() failed\n");
1131 ret = -ENODEV; 1131 ret = -ENODEV;
@@ -1174,7 +1174,7 @@ fail_free_buf:
1174fail_free_io: 1174fail_free_io:
1175 iounmap(info->mmio_base); 1175 iounmap(info->mmio_base);
1176fail_free_res: 1176fail_free_res:
1177 release_mem_region(r->start, r->end - r->start + 1); 1177 release_mem_region(r->start, resource_size(r));
1178fail_put_clk: 1178fail_put_clk:
1179 clk_disable(info->clk); 1179 clk_disable(info->clk);
1180 clk_put(info->clk); 1180 clk_put(info->clk);