From 92b421416f8194aec87b1439487b5544e9ac8187 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Mon, 31 Dec 2007 10:05:43 -0800 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/base/base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/base/base.h') diff --git a/drivers/base/base.h b/drivers/base/base.h index a74ceda34e1..f7ad65a249c 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 -- cgit v1.2.3