Skip to content

Commit

Permalink
tmio_mmc: Fix one off, use resource_size() in probe()
Browse files Browse the repository at this point in the history
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@opensource.se>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
  • Loading branch information
Magnus Damm authored and Pierre Ossman committed Mar 24, 2009
1 parent c0c8887 commit bc6772a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mmc/host/tmio_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,11 +568,11 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev)
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;

Expand Down

0 comments on commit bc6772a

Please sign in to comment.