]> git.baikalelectronics.ru Git - kernel.git/commit
kobject: Always build in kernel/ksysfs.o.
authorPaul Mundt <lethal@linux-sh.org>
Thu, 31 Jan 2008 09:12:34 +0000 (18:12 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 2 Feb 2008 23:14:46 +0000 (15:14 -0800)
commit13f4c200e4fcff6d8f0c41d1f7edb6efb514b1de
treed2b75bf431e74349f4878e833dd340ac3ac0036f
parent886ceed05e8a10c1ed12983657195633e33f5b6e
kobject: Always build in kernel/ksysfs.o.

kernel/ksysfs.c seems to be a random dumping group for misc globals
that the rest of the tree depend on. This has caused problems with
exports in the past when sysfs is disabled, which can already be
observed in commit-id 07f59ca07128cb44da7a36243c41ddd652ca8f7b.

The latest one is the kernel_kobj usage, which presently results in:

fs/built-in.o: In function `debugfs_init':
inode.c:(.init.text+0xc34): undefined reference to `kernel_kobj'
make: *** [.tmp_vmlinux1] Error 1

kernel/ksysfs.c itself at this point only contains globals and some
basic sysfs initialization, the sysfs initialization code is optimized
out when we build with sysfs disabled. Given that, it's easier to just
build in unconditionally, rather than trying to find some other random
place to dump and initialize the globals.

Additionally, the current trend seems to be decoupling of kobjects from
sysfs, in which case it still makes sense to perform the kernel_kobj
initialization that happens here even if sysfs is disabled, as
lib/kobject.o is built-in unconditionally.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/Makefile