Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=92b421416f8194aec87b1439487b5544e9ac8187
Commit:     92b421416f8194aec87b1439487b5544e9ac8187
Parent:     9148fe8767dc8612b2e66d11126744d6436cc94e
Author:     Randy Dunlap <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 31 10:05:43 2007 -0800
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Jan 24 20:40:42 2008 -0800

    driver core: fix build with SYSFS=n
    
    When SYSFS=n and MODULES=y, build ends with:
    
    linux-2.6.24-rc6-mm1/drivers/base/module.c: In function 'module_add_driver':
    linux-2.6.24-rc6-mm1/drivers/base/module.c:49: error: 'module_kset' 
undeclared (first use in this function)
    make[3]: *** [drivers/base/module.o] Error 1
    
    Below is one possible fix.
    Build-tested with all 4 config combinations of SYSFS & MODULES.
    
    Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/Makefile |    2 ++
 drivers/base/base.h   |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/base/Makefile b/drivers/base/Makefile
index ff26968..63e09c0 100644
--- a/drivers/base/Makefile
+++ b/drivers/base/Makefile
@@ -11,7 +11,9 @@ obj-$(CONFIG_FW_LOADER)       += firmware_class.o
 obj-$(CONFIG_NUMA)     += node.o
 obj-$(CONFIG_MEMORY_HOTPLUG_SPARSE) += memory.o
 obj-$(CONFIG_SMP)      += topology.o
+ifeq ($(CONFIG_SYSFS),y)
 obj-$(CONFIG_MODULES)  += module.o
+endif
 obj-$(CONFIG_SYS_HYPERVISOR) += hypervisor.o
 
 ifeq ($(CONFIG_DEBUG_DRIVER),y)
diff --git a/drivers/base/base.h b/drivers/base/base.h
index a74ceda..f7ad65a 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -81,7 +81,7 @@ extern int devres_release_all(struct device *dev);
 
 extern struct kset *devices_kset;
 
-#ifdef CONFIG_MODULES
+#if defined(CONFIG_MODULES) && defined(CONFIG_SYSFS)
 extern void module_add_driver(struct module *mod, struct device_driver *drv);
 extern void module_remove_driver(struct device_driver *drv);
 #else
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to