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