内核编译蓝牙错误

时间:2016-05-31 01:58:43

标签: bluetooth kernel

我试图为Samsung S4修改和构建新内核。

我就像here一样。

但是当我做的时候,我遇到了一些问题:

代码:

drivers/bluetooth/btusb.c: In function '__check_ignore_dga':
drivers/bluetooth/btusb.c:1231:1: warning: return from incompatible                  pointer type [enabled by default]
error, forbidden warning: btusb.c:1231
scripts/Makefile.build:307: recipe for target     'drivers/bluetooth/btusb.o' failed
make[2]: *** [drivers/bluetooth/btusb.o] Error 1
scripts/Makefile.build:443: recipe for target 'drivers/bluetooth'  failed
make[1]: *** [drivers/bluetooth] Error 2
Makefile:973: recipe for target 'drivers' failed
make: *** [drivers] Error 2

我已经将问题谷歌了几个小时, 但还无法找到任何解决方案。

我需要做些什么来解决这个问题?

非常感谢。

1 个答案:

答案 0 :(得分:1)

感谢@jcadduono, 它解决了我的问题。

这是他的solutoin:

  在第1231行的btusb.c中,

可能是一个module_param   声明ignore_dga作为布尔切换,但ignore_dga是   可能在文件顶部附近声明为一个整数   1或0选择。将它改为bool,就像bool ignore_dga = false;   而不是int ignore_dga = 0;例如

因此,我编辑了文件drivers/bluetooth/btusb.c

然后,更改以下代码:

static int ignore_dga;
static int ignore_csr;
static int ignore_sniffer;
static int disable_scofix;
static int force_scofix;

static int reset = 1;

为:

static bool ignore_dga;
static bool ignore_csr;
static bool ignore_sniffer;
static bool disable_scofix;
static bool force_scofix;

static bool reset = true;

保存并制作,效果很好。