Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6387149
  • 博文数量: 579
  • 博客积分: 1548
  • 博客等级: 上尉
  • 技术积分: 16635
  • 用 户 组: 普通用户
  • 注册时间: 2012-12-12 15:29
个人简介

http://www.csdn.net/ http://www.arm.com/zh/ https://www.kernel.org/ http://www.linuxpk.com/ http://www.51develop.net/ http://linux.chinaitlab.com/ http://www.embeddedlinux.org.cn http://bbs.pediy.com/

文章分类

全部博文(579)

文章存档

2018年(18)

2015年(91)

2014年(159)

2013年(231)

2012年(80)

分类: 嵌入式

2013-01-07 10:55:08

在linux-2.6.36内核上加载编译驱动时,出现

 error:unknown field 'ioctl' specified in initializer

原因是:在2.6.36内核上file_operations发生了重大的改变:

原先的

  int (*ioctl)(struct inode*, struct file*, unsigned int, unsigned long);

被改为了       

   long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
        long (*compat_ioctl) (struct file *, unsigned int, unsigned long);

因而在实际驱动中,我们需要将原先的写的ioctl函数头给改成下面的unlocked_ioctl,在file_operations结构体的填充中也是一样。

阅读(1923) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~