Thread (7 messages) 7 messages, 3 authors, 2009-01-03

linux-next: driver-core tree build failure

From: Stephen Rothwell <hidden>
Date: 2008-12-22 12:59:40
Subsystem: driver core, kobjects, debugfs and sysfs, the rest · Maintainers: Greg Kroah-Hartman, "Rafael J. Wysocki", Danilo Krummrich, Linus Torvalds

Hi Greg,

Today's linux-next build (powerpc allnoconfig) failed like this:

drivers/base/core.c: In function '__root_device_register':
drivers/base/core.c:1277: error: dereferencing pointer to incomplete type

Caused by bf86dbd2451d1012c2c968a960470e485b869f5b ("driver core: add
root_device_register()").  This needs to cope with !CONFIG_MODULES (where
struct module is not defined).

I applied the following patch but only for today because it is too hard
to revert the above patch ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

From: Stephen Rothwell <redacted>
Date: Mon, 22 Dec 2008 23:50:56 +1100
Subject: [PATCH] driver core: fix root_device_register for not CONFIG_MODULES

Signed-off-by: Stephen Rothwell <redacted>
---
 drivers/base/core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 6fbdd8b..aa93980 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1273,6 +1273,7 @@ struct device *__root_device_register(const char *name, struct module *owner)
 		return ERR_PTR(err);
 	}
 
+#ifdef CONFIG_MODULE
 	if (owner) {
 		struct module_kobject *mk = &owner->mkobj;
 
@@ -1283,6 +1284,7 @@ struct device *__root_device_register(const char *name, struct module *owner)
 		}
 		root->owner = owner;
 	}
+#endif
 
 	return &root->dev;
 }
-- 
1.6.0.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help