我正在编写RFID设备驱动程序,并在下面遇到编译错误:
[root@localhost kernel]# make modules
CHK include/linux/version.h
make[1]: `arch/arm/kernel/asm-offsets.s' is up to date.
make[1]: `include/asm-arm/mach-types.h' is up to date.
CC [M] drivers/char/gpio_led.o
CC [M] drivers/char/rf531_drv.o
drivers/char/rf531_drv.c:35: error: parse error before "Ioff_t"
drivers/char/rf531_drv.c:35: warning: function declaration isn't a prototype
drivers/char/rf531_drv.c:36: error: parse error before "Ioff_t"
drivers/char/rf531_drv.c:36: warning: function declaration isn't a prototype
然后我发现类型Ioff_t在$(srctree)/include/linux/types.h中定义,所以我将#include标头添加到源代码rf531_drv.c中,但错误仍然存在。任何人都遇到过这个那种问题?你能提出一些建议和帮助吗?