lkml.org 
[lkml]   [2009]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 01/05] tmio_mmc: Fix one off, use resource_size() in probe()
    From:  Magnus Damm <damm@opensource.se>

    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>
    ---

    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;


    \
     
     \ /
      Last update: 2009-03-11 14:03    [W:0.028 / U:29.500 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site