1.报错解决
android kernel报错:
warning: initialization from incompatible pointer type error, forbidden warning:xxx.c 102
解决:一般是注册回调函数,返回值和参数类型不一样导致的
栗子:
//回调实现
static void xxx_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai){...}
static const struct snd_soc_dai_ops xxx_dai_ops = {
.startup = xxx_startup,//返回值不同报错
};
函数定义:
kernel/msm-3.18/include/sound/soc-dai.h
struct snd_soc_dai_ops {
int (*startup)(struct snd_pcm_substream *,struct snd_soc_dai *);
};
修改:static void xxx_startup() 为 static int xxx_startup();即可