__devexit_p

来源:互联网 发布:淘宝未发货退款影响吗 编辑:程序博客网 时间:2024/06/11 07:02

.remove = __devexit_p(s3c2410wdt_remove),

进入init.h,

/* Functions marked as __devexit may be discarded at kernel link time, dependingon config options. Newer versions of binutils detect references fromretained sections to discarded sections and flag an error. Pointers to__devexit functions must use __devexit_p(function_name), the wrapper willinsert either the function_name or NULL, depending on the config options.*/#if defined(MODULE) || defined(CONFIG_HOTPLUG)#define __devexit_p(x) x#else#define __devexit_p(x) NULL#endif
这个标记根据是否配置MODULE/CONFIG_HOTPLUG来决定括号里是x还是为空。

原创粉丝点击