uvc_v4l2_ioctl.h 提示出错 too few arguments to function ‘v4l_printk_ioctl’

今天编译了UVC的摄像头的驱动,突然不给力了老是提示以下错误:

/home/king/work/Maxim/64380-3.2.4/host/Linux/uvcdriver/src/uvcvideo-next/uvc_v4l2.c: In function ‘uvc_v4l2_ioctl’:

/home/king/work/Maxim/64380-3.2.4/host/Linux/uvcdriver/src/uvcvideo-next/uvc_v4l2.c:1092:3: warning: passing argument 1 of ‘v4l_printk_ioctl’ makes pointer from integer without a cast [enabled by default]
include/media/v4l2-ioctl.h:301:13: note: expected ‘const char *’ but argument is of type ‘unsigned int’
/home/king/work/Maxim/64380-3.2.4/host/Linux/uvcdriver/src/uvcvideo-next/uvc_v4l2.c:1092:3: error: too few arguments to function ‘v4l_printk_ioctl’
include/media/v4l2-ioctl.h:301:13: note: declared here
make[2]: *** [/home/king/work/Maxim/64380-3.2.4/host/Linux/uvcdriver/src/uvcvideo-next/uvc_v4l2.o] Error 1
make[1]: *** [_module_/home/king/work/Maxim/64380-3.2.4/host/Linux/uvcdriver/src/uvcvideo-next] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-29-generic'
make: *** [all] Error 2
以前编译都正常,今天就是换了个系统,3.8.0-30-generic不应该呀,于是找了以前版本的 uvc_v4l2_ioctl.h

和系统中的uvc_v4l2_ioctl.h 对比果然改了好多东东,这也需就是为什么我编译过去的原因。于是乎直接:

将 /lib/modules/(uname -a)/build/include/media/v4l2-ioctl.h的给做了个备份
#mv ./v4l2-ioctl.h ./v4l2-ioctl.h_bak

将能够用的(老的)v4l2-ioctl.h拷贝到该文件夹下
#mv ~/v4l2-ioctl.h ./

OK,编译通过。

退出来进入到uvcideo里面编译驱动,顺利通过,而后对比了两个文件发现不宜样的地方有十几处,晕死了,那个家伙修改了文件也不在系统里面提示一下。

对比了两个头文件:

新的:void v4l_printk_ioctl(const char *prefix, unsigned int cmd)

原来的:void v4l_printk_ioctl(unsigned int cmd)

因此如果不更改原头文件可以将调用函数写成 v4l_printk_ioctl(“A”,cmd); 也可以实现编译通过。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值