diff options
author | Greg Kroah-Hartman <greg@kroah.com> | 2004-10-21 23:37:30 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <greg@kroah.com> | 2004-10-21 23:37:30 -0700 |
commit | 6a2c20d7741656ec9072606f6ccb6a723d2a1bee (patch) | |
tree | 16d97b0cd7957b97c7e583640ed477e172fd8e59 /lib | |
parent | 05d2e49cb69814247d4db76d3d90d1fada19bbeb (diff) | |
parent | 2394704ccc4d3cc5f44df782d02d39b144a52ea1 (diff) | |
download | history-6a2c20d7741656ec9072606f6ccb6a723d2a1bee.tar.gz |
Merge kroah.com:/home/greg/linux/BK/bleed-2.6
into kroah.com:/home/greg/linux/BK/driver-2.6
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 7 | ||||
-rw-r--r-- | lib/Makefile | 6 | ||||
-rw-r--r-- | lib/kobject.c | 4 |
3 files changed, 13 insertions, 4 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 8c147cddbbda12..b4d08ad9ee4c93 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -64,6 +64,13 @@ config DEBUG_SPINLOCK_SLEEP 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 --git a/lib/Makefile b/lib/Makefile index 373b170e2c0185..afbaa641ac8e52 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -2,12 +2,16 @@ # 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 --git a/lib/kobject.c b/lib/kobject.c index d623f0575f2300..9af6ccc7b76525 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -10,8 +10,6 @@ * about using the kobject interface. */ -#undef DEBUG - #include <linux/kobject.h> #include <linux/string.h> #include <linux/module.h> @@ -123,7 +121,7 @@ char *kobject_get_path(struct kobject *kobj, int gfp_mask) */ 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); } |