diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2013-08-23 11:03:43 -0400 |
---|---|---|
committer | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2013-12-04 11:19:30 -0500 |
commit | d6782c263661abd6c7e8a375141d69fdc457f9e1 (patch) | |
tree | 4e43750d3ddbcbe1de3696e1bcbe50e3e982acc2 /drivers/clk/clk.h | |
parent | 4eadfc38c4d6e30775d3764f9a1a3098789d2acc (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.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/clk/clk.h b/drivers/clk/clk.h new file mode 100644 index 000000000000..795cc9f0dac0 --- /dev/null +++ b/drivers/clk/clk.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * linux/drivers/clk/clk.h | ||
3 | * | ||
4 | * Copyright (C) 2013 Samsung Electronics Co., Ltd. | ||
5 | * Sylwester Nawrocki <s.nawrocki@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK) | ||
13 | struct clk *__of_clk_get_from_provider(struct of_phandle_args *clkspec); | ||
14 | void of_clk_lock(void); | ||
15 | void of_clk_unlock(void); | ||
16 | #endif | ||