[lkml]   [2008]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 15/21] ide-floppy: disambiguate function names
    There were two almost identical function names in ide-floppy.c, which makes their
    distinction almost impossible. While ide_floppy_release() cleans up the object
    after the last reference to it has been dropped, idefloppy_release() is the blkdev
    .release method from struct block_device_operations which releases that last reference.

    Rename ide_floppy_release() to idefloppy_cleanup_obj() in order to make its purpose
    more clear. There should be no functionality change resulting from this patch.

    Signed-off-by: Borislav Petkov <>
    drivers/ide/ide-floppy.c | 6 +++---
    1 files changed, 3 insertions(+), 3 deletions(-)

    diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
    index b718615..6e8926a 100644
    --- a/drivers/ide/ide-floppy.c
    +++ b/drivers/ide/ide-floppy.c
    @@ -234,12 +234,12 @@ static struct ide_floppy_obj *ide_floppy_get(struct gendisk *disk)
    return floppy;

    -static void ide_floppy_release(struct kref *);
    +static void idefloppy_cleanup_obj(struct kref *);

    static void ide_floppy_put(struct ide_floppy_obj *floppy)
    - kref_put(&floppy->kref, ide_floppy_release);
    + kref_put(&floppy->kref, idefloppy_cleanup_obj);

    @@ -1431,7 +1431,7 @@ static void ide_floppy_remove(ide_drive_t *drive)

    -static void ide_floppy_release(struct kref *kref)
    +static void idefloppy_cleanup_obj(struct kref *kref)
    struct ide_floppy_obj *floppy = to_ide_floppy(kref);
    ide_drive_t *drive = floppy->drive;

     \ /
      Last update: 2008-01-11 13:09    [W:0.021 / U:1.516 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site