Cannot compile latest mtd with 2.6.10

Mandeep Ahuja ahuja at aksysnetworks.com
Mon Jun 2 19:48:04 EDT 2008


Hi,
I recently check out the 'mtd' module from CVS. I have kernel 2.6.10 for 
mips malta board. I ran the patchkernel.sh script and then tried to 
compile my kernel.

I ran into this
 CHK     include/linux/version.h
make[1]: `arch/mips/kernel/offset.s' is up to date.
 CHK     include/asm-mips/offset.h
 CHK     include/linux/compile.h
 CHK     usr/initramfs_list
 CC      drivers/mtd/mtdcore.o
drivers/mtd/mtdcore.c:28: warning: type defaults to `int' in declaration 
of `DEFINE_MUTEX'
drivers/mtd/mtdcore.c:28: warning: parameter names (without types) in 
function declaration
drivers/mtd/mtdcore.c:28: warning: data definition has no type or 
storage class
drivers/mtd/mtdcore.c:31: error: `mtd_table_mutex' undeclared here (not 
in a function)
drivers/mtd/mtdcore.c:31: error: initializer element is not constant
drivers/mtd/mtdcore.c:31: error: (near initialization for 
`__ksymtab_mtd_table_mutex.value')
drivers/mtd/mtdcore.c: In function `add_mtd_device':
drivers/mtd/mtdcore.c:50: warning: implicit declaration of function 
`mutex_lock'
drivers/mtd/mtdcore.c:68: warning: implicit declaration of function 
`mutex_unlock'
drivers/mtd/mtdcore.c: At top level:
drivers/mtd/mtdcore.c:31: error: __ksymtab_mtd_table_mutex causes a 
section type conflict
make[2]: *** [drivers/mtd/mtdcore.o] Error 1
make[1]: *** [drivers/mtd] Error 2
make: *** [drivers] Error 2

Looks like some mutex problem, but the 2.6.10 does not have mutexes. How 
do I get around this problem?

Would appreciate any help
thanks
Mandeep



More information about the linux-mtd mailing list