• Christoph Hellwig's avatar
    [PATCH] rework shost/sdev attribute handling · a1b6bcff
    Christoph Hellwig authored
    I've finally found some time to look over the per-driver sdev/shost attribute
    handling and I'm not so happy with it.  First it adds new writeable
    variables to the host templates which is otherwise almost readonly,
    the other thing is that it needs per-template procedure calls in the
    drivers wheras we have moved away from that.  Also it looks a bit
    coplicated :)
    
    I've attached a patch below that makes the attributes handling a lot
    simpler.  Details:
    
     - the shost_attrs and sdev_attrs in the host template are now used
       to store the attributes overriden or added by the LLDD.
     - the midlayer creates those first and then the generic attributes
       that haven't been overridded and the other way around.
     - the host attributes are properly unregistered now and don't leak
       anymore.
    
    Unlike the first patch the attribute inheritance is back.
    a1b6bcff
53c700.c 65.7 KB