提交 8ba4fcdf 编写于 作者: G Gao Feng 提交者: Jessica Yu

module: Unify the return value type of try_module_get

The prototypes of try_module_get are different with different macro.
When enable module and module unload, it returns bool, but others not.
Make the return type for try_module_get consistent across all module
config options.
Signed-off-by: NGao Feng <fgao@ikuai8.com>
[jeyu: slightly amended changelog to make it clearer]
Signed-off-by: NJessica Yu <jeyu@redhat.com>
上级 5bd933fe
......@@ -582,7 +582,7 @@ extern bool try_module_get(struct module *module);
extern void module_put(struct module *module);
#else /*!CONFIG_MODULE_UNLOAD*/
static inline int try_module_get(struct module *module)
static inline bool try_module_get(struct module *module)
{
return !module || module_is_live(module);
}
......@@ -674,9 +674,9 @@ static inline void __module_get(struct module *module)
{
}
static inline int try_module_get(struct module *module)
static inline bool try_module_get(struct module *module)
{
return 1;
return true;
}
static inline void module_put(struct module *module)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册