+ -
当前位置:首页 → 问答吧 → error:'adc_fops' undeclared here

error:'adc_fops' undeclared here

时间:2011-06-30

来源:互联网

S3C2440编译AD驱动是出现:
error: 'adc_fops' undeclared here (not in a function)
error: 'adc_release' undeclared here (not in a function)


请问是少加了什么头文件吗?

作者: stev_yang   发布时间: 2011-06-30

'adc_fops' 这个似乎是adc设备的一个file_operations的结构体名称,该结构体定义于<linux/fs.h>头文件内。

'adc_release'是adc释放资源的函数,不用加头文件。

除了头文件的可能性外,另一个可能就是你在未定义这些东西之前使用了。
解决:看编译信息出错在哪一行,是否在未定义前使用了,可以调整一下结构体、函数的位置。

个人意见,一家之言。

作者: subfate   发布时间: 2011-06-30