summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.h
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-08-23 17:03:43 +0200
committerSylwester Nawrocki <s.nawrocki@samsung.com>2013-12-04 17:19:30 +0100
commitd6782c263661abd6c7e8a375141d69fdc457f9e1 (patch)
tree4e43750d3ddbcbe1de3696e1bcbe50e3e982acc2 /drivers/clk/clk.h
parent4eadfc38c4d6e30775d3764f9a1a3098789d2acc (diff)
clk: Provide not locked variant of of_clk_get_from_provider()
Add helper functions for the of_clk_providers list locking and an unlocked variant of of_clk_get_from_provider(). These functions are intended to be used in the clkdev to avoid race condition in the device tree based clock look up in clk_get(). 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>
Diffstat (limited to 'drivers/clk/clk.h')
-rw-r--r--drivers/clk/clk.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/clk/clk.h b/drivers/clk/clk.h
new file mode 100644
index 00000000000..795cc9f0dac
--- /dev/null
+++ b/drivers/clk/clk.h
@@ -0,0 +1,16 @@
+/*
+ * linux/drivers/clk/clk.h
+ *
+ * Copyright (C) 2013 Samsung Electronics Co., Ltd.
+ * Sylwester Nawrocki <s.nawrocki@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK)
+struct clk *__of_clk_get_from_provider(struct of_phandle_args *clkspec);
+void of_clk_lock(void);
+void of_clk_unlock(void);
+#endif