lkml.org 
[lkml]   [2009]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] mfd/htc-egpio: fix iomem resource handling using resource_size
    Date
    Fixes an off-by-one error in the iomem resource mapping.

    Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
    ---
    drivers/mfd/htc-egpio.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c
    index 1a4d046..e9b0745 100644
    --- a/drivers/mfd/htc-egpio.c
    +++ b/drivers/mfd/htc-egpio.c
    @@ -286,7 +286,7 @@ static int __init egpio_probe(struct platform_device *pdev)
    res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
    if (!res)
    goto fail;
    - ei->base_addr = ioremap_nocache(res->start, res->end - res->start);
    + ei->base_addr = ioremap_nocache(res->start, resource_size(res));
    if (!ei->base_addr)
    goto fail;
    pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr);
    --
    1.5.6.5


    \
     
     \ /
      Last update: 2009-01-31 21:51    [W:0.023 / U:64.320 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site