项目场景:
drivers/input/touchscreen/gt9xx/goodix_tool.c:200:56: error: incompatible pointer types passing ‘const struct file_operations *’ to parameter of type ‘const struct proc_ops *’ [-Werror,-Wincompatible-pointer-types]
goodix_proc_entry = proc_create(procname, 0666, NULL, >p_proc_ops);
^~~~~~~~~~~~~
./include/linux/proc_fs.h:109:122: note: passing argument to parameter ‘proc_ops’ here
struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
^
1 error generated.
看代码发现采用的结构体为实参file_operations
实际上报错上的看代码发现proc_fs.h采用的结构体形参为
自己修改
编译通过