Skip to contentSkip to conversation

Debugfs compile fix.

PATCH New Denis V. Lunev 1 participant 1 message Jan 30, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Debugfs compile fix.

Debugfs is not compiled without CONFIG_SYSFS in net-2.6 tree. Move kobject_create_and_add under appropriate ifdef. The fix looks correct from a first glance, but may be the dependency should be added into the Kconfig.

---
 fs/debugfs/inode.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/debugfs/inode.c +2 -0
index d26e282..61cc937 100644
@@ -432,9 +432,11 @@ static int __init debugfs_init(void)
 {
 	int retval;
 
+#ifdef CONFIG_SYSFS
 	debug_kobj = kobject_create_and_add("debug", kernel_kobj);
 	if (!debug_kobj)
 		return -EINVAL;
+#endif
 
 	retval = register_filesystem(&debug_fs_type);
 	if (retval)
Signature · 1 line
1.5.3.rc5