summaryrefslogtreecommitdiffstats
path: root/include/linux/clk-private.h
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-08-24 15:00:10 +0200
committerSylwester Nawrocki <s.nawrocki@samsung.com>2013-12-04 17:19:52 +0100
commitfcb0ee6a3d331fb23dbb546500021f6e4cac5689 (patch)
treeaeb616745828ea298e1a793cfc819e9b8401bc0d /include/linux/clk-private.h
parentac2df527fb407b61f9c812a99035b62a75a77d6d (diff)
clk: Implement clk_unregister
clk_unregister() is currently not implemented and it is required when a clock provider module needs to be unloaded. Normally the clock supplier module is prevented to be unloaded by taking reference on the module in clk_get(). For cases when the clock supplier module deinitializes despite the consumers of its clocks holding a reference on the module, e.g. when the driver is unbound through "unbind" sysfs attribute, there are empty clock ops added. These ops are assigned temporarily to struct clk and used until all consumers release the clock, to avoid invoking callbacks from the module which just got removed. Signed-off-by: Jiada Wang <jiada_wang@mentor.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'include/linux/clk-private.h')
-rw-r--r--include/linux/clk-private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h
index 8cb1865e7d9..72c65e05450 100644
--- a/include/linux/clk-private.h
+++ b/include/linux/clk-private.h
@@ -12,6 +12,7 @@
#define __LINUX_CLK_PRIVATE_H
#include <linux/clk-provider.h>
+#include <linux/kref.h>
#include <linux/list.h>
/*
@@ -50,6 +51,7 @@ struct clk {
#ifdef CONFIG_COMMON_CLK_DEBUG
struct dentry *dentry;
#endif
+ struct kref ref;
};
/*