lkml.org 
[lkml]   [2010]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[71/74] pktcdvd: removing device does not remove its sysfs dir
    2.6.32-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>

    commit ca0bf64d99f6e3f6e2fe2585e52a0ac57354beac upstream.

    This is the counterpart to cba767175becadc5c4016cceb7bfdd2c7fe722f4
    ("pktcdvd: remove broken dev_t export of class devices"). Device is not
    registered using dev_t, so it should not be destroyed using device_destroy
    which looks up the device by dev_t. This will fail and adding the device
    again will fail with the "duplicate name" error. This is fixed using
    device_unregister instead of device_destroy.

    Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
    Cc: Kay Sievers <kay.sievers@vrfy.org>
    Cc: Peter Osterlund <petero2@telia.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Jens Axboe <jens.axboe@oracle.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/block/pktcdvd.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/block/pktcdvd.c
    +++ b/drivers/block/pktcdvd.c
    @@ -322,7 +322,7 @@ static void pkt_sysfs_dev_remove(struct
    pkt_kobj_remove(pd->kobj_stat);
    pkt_kobj_remove(pd->kobj_wqueue);
    if (class_pktcdvd)
    - device_destroy(class_pktcdvd, pd->pkt_dev);
    + device_unregister(pd->dev);
    }





    \
     
     \ /
      Last update: 2010-02-04 18:27    [W:4.058 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site