lkml.org 
[lkml]   [2007]   [Dec]   [31]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateMon, 31 Dec 2007 12:11:15 -0800
FromRandy Dunlap <>
SubjectRe: 2.6.24-rc6-mm1 (driver core/sysfs)
On Sat, 22 Dec 2007 23:30:56 -0800 Andrew Morton wrote:

> 
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.24-rc6/2.6.24-rc6-mm1/


With CONFIG_BLOCK=n:

  LD      drivers/block/built-in.o
/local/linsrc/linux-2.6.24-rc6-mm1/drivers/base/core.c: In function 'device_add_class_symlinks':
/local/linsrc/linux-2.6.24-rc6-mm1/drivers/base/core.c:707: error: 'part_type' undeclared (first use in this function)
/local/linsrc/linux-2.6.24-rc6-mm1/drivers/base/core.c: In function 'device_remove_class_symlinks':
/local/linsrc/linux-2.6.24-rc6-mm1/drivers/base/core.c:746: error: 'part_type' undeclared (first use in this function)
make[3]: *** [drivers/base/core.o] Error 1


and that is after fixing (in some sense) the first CONFIG_BLOCK=n
problem with the patch below.  Please test lots of configs.
and/or use 'make randconfig' (automated, scripted, e.g., etc.).
maybe check Documentation/SubmitChecklist.  :)

---
From: Randy Dunlap <randy.dunlap@oracle.com>

Parts of driver core use blk_lookup_devt() when CONFIG_BLOCK=n,
so provide an short inline version of it for that case.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 include/linux/genhd.h |    7 +++++++
 1 file changed, 7 insertions(+)
--- linux-2.6.24-rc6-mm1.orig/include/linux/genhd.h
+++ linux-2.6.24-rc6-mm1/include/linux/genhd.h
@@ -10,6 +10,7 @@
  */
 
 #include <linux/types.h>
+#include <linux/kdev_t.h>
 
 #ifdef CONFIG_BLOCK
 
@@ -443,6 +444,12 @@ static inline struct block_device *bdget
 
 static inline void printk_all_partitions(void) { }
 
+static inline dev_t blk_lookup_devt(const char *name)
+{
+	dev_t devt = MKDEV(0, 0);
+	return devt;
+}
+
 #endif /* CONFIG_BLOCK */
 
 #endif

\
 
 \ /
  Last update: 2007-12-31 21:13    [from the cache]
©2003-2008