diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-02-05 15:39:11 -0800 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-03-12 12:20:34 -0700 |
commit | 306c342f9cb1f573af57a6afd1b3549aa97b9281 (patch) | |
tree | 12b6028e71456ca59e0f2632c38b27e1e085c2c4 /drivers/clk/clkdev.c | |
parent | 50595f8b9e78b3c80d341bf9da3e7848d9abbe2a (diff) | |
download | linux-rpi-306c342f9cb1f573af57a6afd1b3549aa97b9281.tar.gz linux-rpi-306c342f9cb1f573af57a6afd1b3549aa97b9281.tar.bz2 linux-rpi-306c342f9cb1f573af57a6afd1b3549aa97b9281.zip |
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 <s.nawrocki@samsung.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/clkdev.c')
-rw-r--r-- | drivers/clk/clkdev.c | 30 |
1 files changed, 1 insertions, 29 deletions
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; |