jlinkv8 发表于 2012-09-11 16:47

请教一个驱动的问题

CONFIG_PM=y 在内核config中定义配置

在驱动中:

static struct platform_driver sci_driver = {
.probe = bcm5892sci_probe,
.remove = bcm5892sci_remove,
#ifdef CONFIG_PM
.suspend = bcm5892sci_suspend,
.resume = bcm5892sci_resume,
#endif
.driver =
{
.name = bcm5892sci_name,
.owner = THIS_MODULE,
},
};

而整个sci驱动是单独编译模块,然后进行insmod加载的。
对这个驱动模块来说,CONFIG_PM算不算已经定义过的?

leon_yu 发表于 2012-09-14 17:24

算,只要编译的时候指定你配置的那套内核树
页: [1]
查看完整版本: 请教一个驱动的问题