嵌入式爱好者

查看: 6169|回复: 1

linux2.6.36.4内核编译出错

[复制链接]

0

主题

0

帖子

0

积分

扫一扫,手机访问本帖
发表于 2011-4-8 22:15:35 | 显示全部楼层 |阅读模式
我在内核官方网站下载了linux2.6.36.4版本的内核,想移植触摸屏的驱动,经过不断的修改,最后出现了这样的问题:
drivers/char/s3c_adc.c:157: error: unknown field 'ioctl' specified in initializer
drivers/char/s3c_adc.c:157: warning: initialization from incompatible pointer type
make[2]: *** [drivers/char/s3c_adc.o] 错误 1
make[1]: *** [drivers/char] 错误 2
make: *** [drivers] 错误 2

[code]153     static struct file_operations s3c_adc_fops = {
        154                         .owner                = THIS_MODULE,
        155                        .read                = s3c_adc_read,
        156                        .open                = s3c_adc_open,
        157                        .ioctl          = s3c_adc_ioctl,
        158             };

在网上查了相关的资料,解释为下:
2.6.36的file_operations结构发生了重大变化。取消了原有的ioctl成员,添加来新的成员
      long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
        long (*compat_ioctl) (struct file *, unsigned int, unsigned long);  
1.我想,如果可以找到static struct file_operations定义的文件,就可以解决了。但是我对代码不是很熟,可以告诉我这个结构体定义的位置吗?
2.具体的怎么修改才可以使内核编译成功,可以解释一下吗?

非常感谢!
回复

使用道具 举报

0

主题

0

帖子

0

积分

 楼主| 发表于 2011-4-9 09:18:26 | 显示全部楼层
为什么没有人回答呢?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-7-8 19:50

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表