mxc_dataflash.c in kernel version of L2.6.35_10.12.01 can not compile successfully

Discussion created by GNSS 吴 on Feb 20, 2012

I compiled L2.6.35_10.12.01_ER_images_MX28 provided L2.6.35_10.12.01 version of the kernel, and add all the patches, but the compiler error is as follows:

drivers/mtd/devices/mxc_dataflash.c: In function 'otp_read':
drivers/mtd/devices/mxc_dataflash.c:577: error: 'mtd' undeclared (first use in this function)
drivers/mtd/devices/mxc_dataflash.c:577: error: (Each undeclared identifier is reported only once
drivers/mtd/devices/mxc_dataflash.c:577: error: for each function it appears in.)
drivers/mtd/devices/mxc_dataflash.c:578: error: 'spi' redeclared as different kind of symbol
drivers/mtd/devices/mxc_dataflash.c:574: error: previous definition of 'spi' was here
drivers/mtd/devices/mxc_dataflash.c:626: error: 'addr' undeclared (first use in this function)
make[3]: *** [drivers/mtd/devices/mxc_dataflash.o] Error 1
make[2]: *** [drivers/mtd/devices] Error 2
make[1]: *** [drivers/mtd] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....


Who had encountered the same error with me!