android - usb_buffer_free 和 usb_buffer_alloc 的编译错误

标签 android linux compiler-errors kernel-module

您好,我在将 usbtouchscreen.c 编译到内核驱动程序时遇到了错误。 我也已将 usbtouchsreen.c 文件附加到帖子中。

 CC      drivers/input/touchscreen/usbtouchscreen.o
drivers/input/touchscreen/usbtouchscreen.c: In function 'usbtouch_free_buffers':
drivers/input/touchscreen/usbtouchscreen.c:856: error: implicit declaration of function 'usb_buffer_free'
drivers/input/touchscreen/usbtouchscreen.c: In function 'usbtouch_probe':
drivers/input/touchscreen/usbtouchscreen.c:890: error: implicit declaration of function 'usb_buffer_alloc'
drivers/input/touchscreen/usbtouchscreen.c:891: warning: assignment makes pointer from integer without a cast
make[3]: *** [drivers/input/touchscreen/usbtouchscreen.o] Error 1
make[2]: *** [drivers/input/touchscreen] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2

我在这里包含了来源:http://pastebin.com/GTsic7Bg

最佳答案

您的驱动程序是否很旧(或者对于较旧的内核,也许)?也许您想看看这个重命名:

https://lkml.org/lkml/2010/4/12/132

它似乎至少在最新的内核中:

http://lxr.linux.no/linux+ */drivers/usb/core/usb.c#L698

事实上,它似乎已经进入 2.6.34 左右。

关于android - usb_buffer_free 和 usb_buffer_alloc 的编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14046465/

相关文章:

java - 我应该关闭本地数据库游标吗?

android - 在android中输入编辑文本时删除特殊字符;

子信号和父信号之间的并发竞争

c++ - 时间:2019-05-10标签:c++ : invalid conversion from `const char* const' to `char*'

java - 运行 Spring Boot 时出错(通过字段表达的依赖关系不满足)

java - 如何将 Realm 列表正确地实现到我的自定义对象中?

Android geocoder 找不到地址,google maps 可以找到

linux - 从输出命令中提取字符串

c# - 从 linux samba 共享和缓存中读取文件

java - printf错误无法启动java eclipse