forked from luck/tmp_suning_uos_patched
ac2df527fb
This patch adds common __clk_get(), __clk_put() clkdev helpers that replace their platform specific counterparts when the common clock API is used. The owner module pointer field is added to struct clk so a reference to the clock supplier module can be taken by the clock consumers. The owner module is assigned while the clock is being registered, in functions _clk_register() and __clk_register(). Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 lines
279 B
C
17 lines
279 B
C
#ifndef __ASM_CLKDEV__H_
|
|
#define __ASM_CLKDEV__H_
|
|
|
|
#include <linux/slab.h>
|
|
|
|
static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size)
|
|
{
|
|
return kzalloc(size, GFP_KERNEL);
|
|
}
|
|
|
|
#ifndef CONFIG_COMMON_CLK
|
|
#define __clk_put(clk)
|
|
#define __clk_get(clk) ({ 1; })
|
|
#endif
|
|
|
|
#endif
|