• Christoph Hellwig's avatar
    [PATCH] abstract out more scsi_device acess out of the low-level drivers · ee89063d
    Christoph Hellwig authored
    Two new helpers: scsi_device_get and scsi_device_put that get/release a
    reference to the underlying HBA driver and increment/decrement
    ->access_count.  Cleanup ->attach/->detach routines in the upper layer
    drivers a bit to consolidate the error pathes once we're cleaning them
    up.
    
    ->attach and ->detach in upper layer drivers are mandatory now (not
    having them would be rather pointless).
    
    (note that the sd.c changes are not in this patch, it'll be part of
    my next, bigger patch)
    ee89063d
scsi.c 62.2 KB