• B
    sysdev: fix debugging statements in registration code. · 838ea8e8
    Ben Dooks 提交于
    The systdev_class_register() and sysdev_register() functions have
    pr_debug() statements which are enabled when the user selects the
    driver core debug. Both of these routines do not produce the
    correct output, as they make assumptions about data which has not
    been initialised.
    
    In sysdev_class_register() the code uses the kobject_name(&cls->kset.kobj)
    at the start of the function, but this is not setup until later in the
    same call. Change this to use cls->name which is passed in from the caller.
    
    The sysdev_register() function tries to get the name of the sysdev by
    kobject_name(&sysdev->kobj), but that isn't setup until later in the same
    function so change this message to use the name of the sysdev's class and
    add another message once the name is initialised.
    Signed-off-by: NBen Dooks <ben-linux@fluff.org>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
    838ea8e8
sys.c 11.8 KB