From 306c342f9cb1f573af57a6afd1b3549aa97b9281 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Thu, 5 Feb 2015 15:39:11 -0800 Subject: clk: Replace of_clk_get_by_clkspec() with of_clk_get_from_provider() of_clk_get_by_clkspec() has the same function signature as of_clk_get_from_provider() struct clk *of_clk_get_by_clkspec(struct of_phandle_args *clkspec) struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec) except of_clk_get_by_clkspec() checks to make sure clkspec is not NULL. Let's remove of_clk_get_by_clkspec() and replace the callers of it (clkconf.c) with of_clk_get_from_provider(). Cc: Sylwester Nawrocki Reviewed-by: Tomeu Vizoso Signed-off-by: Stephen Boyd --- drivers/clk/clkdev.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'drivers/clk/clkdev.c') diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index 043fd3633373..1fcb6ef2cdac 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c @@ -28,34 +28,6 @@ static LIST_HEAD(clocks); static DEFINE_MUTEX(clocks_mutex); #if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK) - -static struct clk *__of_clk_get_by_clkspec(struct of_phandle_args *clkspec, - const char *dev_id, const char *con_id) -{ - struct clk *clk; - - if (!clkspec) - return ERR_PTR(-EINVAL); - - of_clk_lock(); - clk = __of_clk_get_from_provider(clkspec, dev_id, con_id); - of_clk_unlock(); - return clk; -} - -/** - * of_clk_get_by_clkspec() - Lookup a clock form a clock provider - * @clkspec: pointer to a clock specifier data structure - * - * This function looks up a struct clk from the registered list of clock - * providers, an input is a clock specifier data structure as returned - * from the of_parse_phandle_with_args() function call. - */ -struct clk *of_clk_get_by_clkspec(struct of_phandle_args *clkspec) -{ - return __of_clk_get_by_clkspec(clkspec, NULL, __func__); -} - static struct clk *__of_clk_get(struct device_node *np, int index, const char *dev_id, const char *con_id) { @@ -71,7 +43,7 @@ static struct clk *__of_clk_get(struct device_node *np, int index, if (rc) return ERR_PTR(rc); - clk = __of_clk_get_by_clkspec(&clkspec, dev_id, con_id); + clk = __of_clk_get_from_provider(&clkspec, dev_id, con_id); of_node_put(clkspec.np); return clk; -- cgit