bk://kernel.bkbits.net/gregkh/linux/driver-2.6 greg@kroah.com|ChangeSet|20041020223819|07609 greg # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/21 14:19:34-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-driver-core # # lib/Makefile # 2004/10/21 14:19:30-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/10/21 00:25:11-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-driver-core # # include/linux/module.h # 2004/10/21 00:25:06-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/10/20 15:38:19-07:00 greg@kroah.com # kobject: add CONFIG_DEBUG_KOBJECT # # Signed-off-by: Greg Kroah-Hartman # # lib/kobject.c # 2004/10/20 15:38:09-07:00 greg@kroah.com +1 -3 # kobject: add CONFIG_DEBUG_KOBJECT # # Signed-off-by: Greg Kroah-Hartman # # lib/Makefile # 2004/10/20 15:38:09-07:00 greg@kroah.com +5 -1 # kobject: add CONFIG_DEBUG_KOBJECT # # Signed-off-by: Greg Kroah-Hartman # # lib/Kconfig.debug # 2004/10/20 15:38:09-07:00 greg@kroah.com +7 -0 # kobject: add CONFIG_DEBUG_KOBJECT # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/19 21:39:11-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-driver-core # # kernel/Makefile # 2004/10/19 21:39:07-07:00 akpm@bix.(none) +0 -0 # Auto merged # # include/linux/module.h # 2004/10/19 21:39:07-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/usb/core/usb.c # 2004/10/19 21:39:07-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/10/19 17:57:14-07:00 akpm@bix.(none) # foo # # kernel/Makefile # 2004/10/19 17:57:07-07:00 akpm@bix.(none) +0 -1 # foo # # include/linux/module.h # 2004/10/19 17:54:19-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/usb/core/usb.c # 2004/10/19 17:54:19-07:00 akpm@bix.(none) +0 -0 # Auto merged # diff -Nru a/lib/Kconfig.debug b/lib/Kconfig.debug --- a/lib/Kconfig.debug 2004-10-21 14:20:44 -07:00 +++ b/lib/Kconfig.debug 2004-10-21 14:20:44 -07:00 @@ -64,6 +64,13 @@ If you say Y here, various routines which may sleep will become very noisy if they are called with a spinlock held. +config DEBUG_KOBJECT + bool "kobject debugging" + depends on DEBUG_KERNEL + help + If you say Y here, some extra kobject debugging messages will be sent + to the syslog. + config DEBUG_HIGHMEM bool "Highmem debugging" depends on DEBUG_KERNEL && HIGHMEM && (X86 || PPC32 || MIPS || SPARC32) diff -Nru a/lib/Makefile b/lib/Makefile --- a/lib/Makefile 2004-10-21 14:20:44 -07:00 +++ b/lib/Makefile 2004-10-21 14:20:44 -07:00 @@ -2,11 +2,15 @@ # Makefile for some libs needed in the kernel. # - lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \ bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \ kobject.o kref.o idr.o div64.o parser.o int_sqrt.o \ bitmap.o extable.o kobject_uevent.o + +ifeq ($(CONFIG_DEBUG_KOBJECT),y) +CFLAGS_kobject.o += -DDEBUG +CFLAGS_kobject_uevent.o += -DDEBUG +endif lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o diff -Nru a/lib/kobject.c b/lib/kobject.c --- a/lib/kobject.c 2004-10-21 14:20:44 -07:00 +++ b/lib/kobject.c 2004-10-21 14:20:44 -07:00 @@ -10,8 +10,6 @@ * about using the kobject interface. */ -#undef DEBUG - #include #include #include @@ -123,7 +121,7 @@ */ void kobject_init(struct kobject * kobj) { - kref_init(&kobj->kref); + kref_init(&kobj->kref); INIT_LIST_HEAD(&kobj->entry); kobj->kset = kset_get(kobj->kset); }