sh: clock framework update, fix count and kill off kref
This patch updates the clock framework use count code. With this patch the enable() and disable() callbacks only get called when counting from and to zero. While at it the kref stuff gets replaced with an int. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#ifndef __ASM_SH_CLOCK_H
|
||||
#define __ASM_SH_CLOCK_H
|
||||
|
||||
#include <linux/kref.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/clk.h>
|
||||
@@ -28,7 +27,7 @@ struct clk {
|
||||
struct clk *parent;
|
||||
struct clk_ops *ops;
|
||||
|
||||
struct kref kref;
|
||||
int usecount;
|
||||
|
||||
unsigned long rate;
|
||||
unsigned long flags;
|
||||
@@ -37,6 +36,7 @@ struct clk {
|
||||
|
||||
#define CLK_ALWAYS_ENABLED (1 << 0)
|
||||
#define CLK_RATE_PROPAGATES (1 << 1)
|
||||
#define CLK_NEEDS_INIT (1 << 2)
|
||||
|
||||
/* Should be defined by processor-specific code */
|
||||
void arch_init_clk_ops(struct clk_ops **, int type);
|
||||
|
Reference in New Issue
Block a user