• Ralph Campbell's avatar
    IB/core: Allow device-specific per-port sysfs files · 9a6edb60
    Ralph Campbell authored
    Add a new parameter to ib_register_device() so that low-level device
    drivers can pass in a pointer to a callback function that will be
    called for each port that is registered in sysfs.  This allows
    low-level device drivers to create files in
    
        /sys/class/infiniband/<hca>/ports/<N>/
    
    without having to poke through the internals of the RDMA sysfs handling.
    
    There is no need for an unregister function since the kobject
    reference will go to zero when ib_unregister_device() is called.
    Signed-off-by: default avatarRalph Campbell <ralph.campbell@qlogic.com>
    Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
    9a6edb60
sysfs.c 22.8 KB