Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: Move __clk_{get,put}() into private clk.h API

We can move these APIs into the private header file now that we
don't have any users of the __clk_get() and __clk_put() APIs
outside of clkdev.c and clk.c.

Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

+4 -8
+4
drivers/clk/clk.h
··· 20 20 struct clk *__clk_create_clk(struct clk_hw *hw, const char *dev_id, 21 21 const char *con_id); 22 22 void __clk_free_clk(struct clk *clk); 23 + int __clk_get(struct clk *clk); 24 + void __clk_put(struct clk *clk); 23 25 #else 24 26 /* All these casts to avoid ifdefs in clkdev... */ 25 27 static inline struct clk * ··· 34 32 { 35 33 return (struct clk_hw *)clk; 36 34 } 35 + static inline int __clk_get(struct clk *clk) { return 1; } 36 + static inline void __clk_put(struct clk *clk) { } 37 37 38 38 #endif
-8
include/linux/clkdev.h
··· 52 52 int clk_register_clkdev(struct clk *, const char *, const char *); 53 53 int clk_hw_register_clkdev(struct clk_hw *, const char *, const char *); 54 54 55 - #ifdef CONFIG_COMMON_CLK 56 - int __clk_get(struct clk *clk); 57 - void __clk_put(struct clk *clk); 58 - #else 59 - static inline int __clk_get(struct clk *clk) { return 1; } 60 - static inline void __clk_put(struct clk *clk) { } 61 - #endif 62 - 63 55 #endif