kernel-hacking-2024-linux-s.../drivers/base
Ben Dooks 838ea8e8db 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>
2008-07-21 21:54:56 -07:00
..
power driver core: fix a lot of printk usages of bus_id 2008-07-21 21:54:53 -07:00
attribute_container.c
base.h class: change internal semaphore to a mutex 2008-07-21 21:54:52 -07:00
bus.c
class.c class: change internal semaphore to a mutex 2008-07-21 21:54:52 -07:00
core.c class: change internal semaphore to a mutex 2008-07-21 21:54:52 -07:00
cpu.c
dd.c
devres.c
dma-mapping.c
driver.c
firmware.c
firmware_class.c firmware: allow firmware files to be built into kernel image 2008-07-10 14:30:13 +01:00
hypervisor.c
init.c
isa.c
Kconfig firmware: Add CONFIG_FIRMWARE_IN_KERNEL option. 2008-07-10 14:47:20 +01:00
Makefile
map.c
memory.c
module.c
node.c mm: switch node meminfo Active & Inactive pages to Kbytes 2008-07-04 10:40:09 -07:00
platform.c
sys.c sysdev: fix debugging statements in registration code. 2008-07-21 21:54:56 -07:00
topology.c Merge branch 'core/topology' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-07-15 10:32:39 -07:00
transport_class.c