History

clk: remove inline usage from clk-provider.h

Users of GCC 4.7 have reported compiler errors due to having inline applied to function declarations in clk-provider.h. The definitions exist in drivers/clk/clk.c. An example error: 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 This patch removes the use of inline from include/linux/clk-provider.h but keeps the function definitions in drivers/clk/clk.c as inlined since they are one-liners.

Igor Mazanov committed 14 years ago

Commit 93532c81 parent 77b67061 file · +2 −2Browse files

Unified · Split

include/linux/clk-provider.h+2−2
@@ -335,8 +335,8 @@ const char *__clk_get_name(struct clk *clk); · 334 unmodified lines
335struct clk_hw *__clk_get_hw(struct clk *clk);335struct clk_hw *__clk_get_hw(struct clk *clk);
336u8 __clk_get_num_parents(struct clk *clk);336u8 __clk_get_num_parents(struct clk *clk);
337struct clk *__clk_get_parent(struct clk *clk);337struct clk *__clk_get_parent(struct clk *clk);
338inline int __clk_get_enable_count(struct clk *clk);338int __clk_get_enable_count(struct clk *clk);
339inline int __clk_get_prepare_count(struct clk *clk);339int __clk_get_prepare_count(struct clk *clk);
340unsigned long __clk_get_rate(struct clk *clk);340unsigned long __clk_get_rate(struct clk *clk);
341unsigned long __clk_get_flags(struct clk *clk);341unsigned long __clk_get_flags(struct clk *clk);
342int __clk_is_enabled(struct clk *clk);342int __clk_is_enabled(struct clk *clk);