• Patrick Mochel's avatar
    kobjects: Remove kobject::subsys and subsystem::kobj. · 85e865ec
    Patrick Mochel authored
    The kobject core no longer references a subsystem directly through a kobject,
    instead using the kobject's dominant kset to reference the subsystem. The 
    registrants of kobjects have been fixed up. 
    
    To aid in this process, a few helpers were introdcuced: 
    
    - kobj_set_kset_s(obj,subsys)
    - kset_set_kset_s(obj,subsys)
    - subsys_set_kset(obj,subsys)
    
    that set the kset ptr of embedded kobjects for objects that have different
    embedded types. See include/linux/kobject.h for more description and usage.
    
    
    struct subsystem::kobj is also removed, relying solely on a subsystem's
    embedded kset for hierarchy information.  Since this requires modification
    of the subsystem declarations, a helper macro has been defined:
    
    decl_subsys(name,type)
    
    which initializes the name and ktype fields of the subsystem's embedded
    kset. All the subsystem declarations have been fixed up.
    85e865ec
kobject.c 6.72 KB