diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index 6b2f29df3f709feda0dd2dce53f1430152734d2c..7513411140b693ecdb1d4c825de69e0e9e679d15 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c @@ -256,7 +256,7 @@ vclkdev_alloc(struct clk_hw *hw, const char *con_id, const char *dev_fmt, { struct clk_lookup_alloc *cla; - cla = __clkdev_alloc(sizeof(*cla)); + cla = kzalloc(sizeof(*cla), GFP_KERNEL); if (!cla) return NULL; diff --git a/include/linux/clkdev.h b/include/linux/clkdev.h index 2eabc862abdb04c59f4ea60d30ee6edcb5da9188..ef98ee8c6358baae51b26784e707a56178817a43 100644 --- a/include/linux/clkdev.h +++ b/include/linux/clkdev.h @@ -12,7 +12,7 @@ #ifndef __CLKDEV_H #define __CLKDEV_H -#include +#include struct clk; struct clk_hw; @@ -55,6 +55,9 @@ int clk_hw_register_clkdev(struct clk_hw *, const char *, const char *); #ifdef CONFIG_COMMON_CLK int __clk_get(struct clk *clk); void __clk_put(struct clk *clk); +#else +static inline int __clk_get(struct clk *clk) { return 1; } +static inline void __clk_put(struct clk *clk) { } #endif #endif