diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/pxa3xx_nand.c | 6 |
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: | |||
1174 | fail_free_io: | 1174 | fail_free_io: |
1175 | iounmap(info->mmio_base); | 1175 | iounmap(info->mmio_base); |
1176 | fail_free_res: | 1176 | fail_free_res: |
1177 | release_mem_region(r->start, r->end - r->start + 1); | 1177 | release_mem_region(r->start, resource_size(r)); |
1178 | fail_put_clk: | 1178 | fail_put_clk: |
1179 | clk_disable(info->clk); | 1179 | clk_disable(info->clk); |
1180 | clk_put(info->clk); | 1180 | clk_put(info->clk); |