lkml.org 
[lkml]   [2007]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/3] ide-pmac: macio resource freeing bugfix
    Date

    Release DMA resource before zeroing pmif.

    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    ---
    drivers/ide/ppc/pmac.c | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    Index: b/drivers/ide/ppc/pmac.c
    ===================================================================
    --- a/drivers/ide/ppc/pmac.c
    +++ b/drivers/ide/ppc/pmac.c
    @@ -1228,12 +1228,12 @@ pmac_ide_macio_attach(struct macio_dev *
    /* The inteface is released to the common IDE layer */
    dev_set_drvdata(&mdev->ofdev.dev, NULL);
    iounmap(base);
    - if (pmif->dma_regs)
    + if (pmif->dma_regs) {
    iounmap(pmif->dma_regs);
    + macio_release_resource(mdev, 1);
    + }
    memset(pmif, 0, sizeof(*pmif));
    macio_release_resource(mdev, 0);
    - if (pmif->dma_regs)
    - macio_release_resource(mdev, 1);
    }

    return rc;

    \
     
     \ /
      Last update: 2007-12-30 18:35    [W:0.021 / U:31.696 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site