Message ID | 1232436828-15176-2-git-send-email-mike@compulab.co.il |
---|---|
State | Accepted |
Commit | b2ed3680553b451e5c45064de26ea8fa5201c6d4 |
Headers | show |
On Tue, Jan 20, 2009 at 3:33 PM, Mike Rapoport <mike@compulab.co.il> wrote: > > Signed-off-by: Mike Rapoport <mike@compulab.co.il> OK > --- > 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 cc55cbc..ffa960b 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) > goto fail_put_clk; > } > > - r = request_mem_region(r->start, r->end - r->start + 1, pdev->name); > + r = request_mem_region(r->start, resource_size(r), pdev->name); > if (r == NULL) { > dev_err(&pdev->dev, "failed to request memory resource\n"); > ret = -EBUSY; > goto fail_put_clk; > } > > - info->mmio_base = ioremap(r->start, r->end - r->start + 1); > + info->mmio_base = ioremap(r->start, resource_size(r)); > if (info->mmio_base == NULL) { > dev_err(&pdev->dev, "ioremap() failed\n"); > ret = -ENODEV; > @@ -1174,7 +1174,7 @@ fail_free_buf: > fail_free_io: > iounmap(info->mmio_base); > fail_free_res: > - release_mem_region(r->start, r->end - r->start + 1); > + release_mem_region(r->start, resource_size(r)); > fail_put_clk: > clk_disable(info->clk); > clk_put(info->clk); > -- > 1.5.6.4 > > > ------------------------------------------------------------------- > List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel > FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php > Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php >
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index cc55cbc..ffa960b 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) goto fail_put_clk; } - r = request_mem_region(r->start, r->end - r->start + 1, pdev->name); + r = request_mem_region(r->start, resource_size(r), pdev->name); if (r == NULL) { dev_err(&pdev->dev, "failed to request memory resource\n"); ret = -EBUSY; goto fail_put_clk; } - info->mmio_base = ioremap(r->start, r->end - r->start + 1); + info->mmio_base = ioremap(r->start, resource_size(r)); if (info->mmio_base == NULL) { dev_err(&pdev->dev, "ioremap() failed\n"); ret = -ENODEV; @@ -1174,7 +1174,7 @@ fail_free_buf: fail_free_io: iounmap(info->mmio_base); fail_free_res: - release_mem_region(r->start, r->end - r->start + 1); + release_mem_region(r->start, resource_size(r)); fail_put_clk: clk_disable(info->clk); clk_put(info->clk);
Signed-off-by: Mike Rapoport <mike@compulab.co.il> --- drivers/mtd/nand/pxa3xx_nand.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)