From d6782c263661abd6c7e8a375141d69fdc457f9e1 Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Fri, 23 Aug 2013 17:03:43 +0200 Subject: 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 Signed-off-by: Kyungmin Park Acked-by: Russell King --- drivers/clk/clk.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 drivers/clk/clk.h (limited to 'drivers/clk/clk.h') 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 @@ +/* + * linux/drivers/clk/clk.h + * + * Copyright (C) 2013 Samsung Electronics Co., Ltd. + * Sylwester Nawrocki + * + * 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 -- cgit v1.2.3