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

clk: Prepare to remove asm-generic/clkdev.h

Now that all the users of asm/clkdev.h have been replaced with
the generic file we can get rid of the asm-generic file as well
and implement that code directly where it's used.

We only have one caller of __clkdev_alloc(), in clkdev.c so we
can easily remove that and drop the include of asm/clkdev.h in
linux/clkdev.h by putting the __clk_get/__clk_put inlines in
their respective location.

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

+5 -2
+1 -1
drivers/clk/clkdev.c
··· 256 256 { 257 257 struct clk_lookup_alloc *cla; 258 258 259 - cla = __clkdev_alloc(sizeof(*cla)); 259 + cla = kzalloc(sizeof(*cla), GFP_KERNEL); 260 260 if (!cla) 261 261 return NULL; 262 262
+4 -1
include/linux/clkdev.h
··· 12 12 #ifndef __CLKDEV_H 13 13 #define __CLKDEV_H 14 14 15 - #include <asm/clkdev.h> 15 + #include <linux/slab.h> 16 16 17 17 struct clk; 18 18 struct clk_hw; ··· 55 55 #ifdef CONFIG_COMMON_CLK 56 56 int __clk_get(struct clk *clk); 57 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) { } 58 61 #endif 59 62 60 63 #endif