1.kobject_add failed for IIC with -EEXIST, don't try to register things with the same name in the same directory.
仔细分析一下:发现exit中没有卸载资源
2.GPIO: please compile with -fno-common
insmod: error inserting '/mnt/nfs/GPIO.ko': -1 Invalid module format
仔细分析看到驱动编译时就出现问题
WARNING: "flagOUT" [/Linux2.6.12/GPIO] is COMMON symbol
最后找到原因是flagOUT定义是全局变量
在变量前面加个static,问题就解决了
static int flagOUT
本文分析了Linux驱动开发过程中遇到的问题,如kobject_add失败、GPIO驱动编译错误及模块加载失败等,并提供了详细的解决方案。

被折叠的 条评论
为什么被折叠?



