提交 65800b2c 编写于 作者: R Russ Dill 提交者: Michael Turquette

clk: Don't mark shared helper functions as inline

The helper functions that access the opaque struct clk should
not be marked inline since they are contained in clk.c, but expected
to be used by other compilation units. This causes compile errors
under gcc-4.7

In file included from arch/arm/mach-omap2/clockdomain.c:25:0:
arch/arm/mach-omap2/clockdomain.c: In function ‘clkdm_clk_disable’:
include/linux/clk-provider.h:338:12: error: inlining failed in call to always_inline ‘__clk_get_enable_count’: function body not available
arch/arm/mach-omap2/clockdomain.c:1001:28: error: called from here
make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
Signed-off-by: NRuss Dill <Russ.Dill@ti.com>
Signed-off-by: NMike Turquette <mturquette@linaro.org>
[mturquette@linaro.org: removed fixes made redundant by commit 93532c8a]
[mturquette@linaro.org: improved $SUBJECT]
上级 9931faca
......@@ -259,32 +259,32 @@ late_initcall(clk_disable_unused);
/*** helper functions ***/
inline const char *__clk_get_name(struct clk *clk)
const char *__clk_get_name(struct clk *clk)
{
return !clk ? NULL : clk->name;
}
inline struct clk_hw *__clk_get_hw(struct clk *clk)
struct clk_hw *__clk_get_hw(struct clk *clk)
{
return !clk ? NULL : clk->hw;
}
inline u8 __clk_get_num_parents(struct clk *clk)
u8 __clk_get_num_parents(struct clk *clk)
{
return !clk ? 0 : clk->num_parents;
}
inline struct clk *__clk_get_parent(struct clk *clk)
struct clk *__clk_get_parent(struct clk *clk)
{
return !clk ? NULL : clk->parent;
}
inline unsigned int __clk_get_enable_count(struct clk *clk)
unsigned int __clk_get_enable_count(struct clk *clk)
{
return !clk ? 0 : clk->enable_count;
}
inline unsigned int __clk_get_prepare_count(struct clk *clk)
unsigned int __clk_get_prepare_count(struct clk *clk)
{
return !clk ? 0 : clk->prepare_count;
}
......@@ -310,7 +310,7 @@ unsigned long __clk_get_rate(struct clk *clk)
return ret;
}
inline unsigned long __clk_get_flags(struct clk *clk)
unsigned long __clk_get_flags(struct clk *clk)
{
return !clk ? 0 : clk->flags;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册