我正在编写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中定义的,所以我在源代码rf531_drv.c中添加了include头,但错误仍然存在。有人遇到过这种问题吗?你能给我一些建议和帮助吗?

最佳答案

这是loff_t的小写字母“l”,而不是Ioff_t

10-04 13:33