]> git.baikalelectronics.ru Git - kernel.git/commit
sysdev: fix debugging statements in registration code.
authorBen Dooks <ben-linux@fluff.org>
Thu, 12 Jun 2008 18:00:34 +0000 (19:00 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 22 Jul 2008 04:54:56 +0000 (21:54 -0700)
commit96c3a9b46d1bcc1d44092ad4d59077697d0524b1
tree77882a5d063136e61a67a91ba95c2edf1da75e03
parent3eef7dff20a196edf020b7983361fbbc085714c6
sysdev: fix debugging statements in registration code.

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: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/sys.c