[PATCH 01/05] tmio_mmc: Fix one off, use resource_size() in probe()

From: Magnus Damm
Date: Wed Mar 11 2009 - 09:01:43 EST


From: Magnus Damm <damm@xxxxxxxxxxxxx>

Update the tmio_mmc code to use resource_size(). With this
patch applied the correct resource size is passed to ioremap().

Signed-off-by: Magnus Damm <damm@xxxxxxxxxxxxx>
---

drivers/mmc/host/tmio_mmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- 0001/drivers/mmc/host/tmio_mmc.c
+++ work/drivers/mmc/host/tmio_mmc.c 2009-01-29 16:08:04.000000000 +0900
@@ -568,11 +568,11 @@ static int __devinit tmio_mmc_probe(stru
host->mmc = mmc;
platform_set_drvdata(dev, mmc);

- host->ctl = ioremap(res_ctl->start, res_ctl->end - res_ctl->start);
+ host->ctl = ioremap(res_ctl->start, resource_size(res_ctl));
if (!host->ctl)
goto host_free;

- host->cnf = ioremap(res_cnf->start, res_cnf->end - res_cnf->start);
+ host->cnf = ioremap(res_cnf->start, resource_size(res_cnf));
if (!host->cnf)
goto unmap_ctl;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/