2009-12-14 19:12:05

by Hartley Sweeten

[permalink] [raw]
Subject: [PATCH] atmel-mci.c: use resource size()

Use resource_size().

Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Haavard Skinnemoen <[email protected]>

---

diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index fc25586..150242f 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -1628,7 +1628,7 @@ static int __init atmci_probe(struct platform_device *pdev)
}

ret = -ENOMEM;
- host->regs = ioremap(regs->start, regs->end - regs->start + 1);
+ host->regs = ioremap(regs->start, resource_size(regs));
if (!host->regs)
goto err_ioremap;


2009-12-14 20:10:12

by Haavard Skinnemoen

[permalink] [raw]
Subject: Re: [PATCH] atmel-mci.c: use resource size()

"H Hartley Sweeten" <[email protected]> wrote:
> Use resource_size().
>
> Signed-off-by: H Hartley Sweeten <[email protected]>
> Cc: Haavard Skinnemoen <[email protected]>

Acked-by: Haavard Skinnemoen <[email protected]>