summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk-conf.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2015-02-05 15:39:11 -0800
committerStephen Boyd <sboyd@codeaurora.org>2015-03-12 12:20:34 -0700
commit306c342f9cb1f573af57a6afd1b3549aa97b9281 (patch)
tree12b6028e71456ca59e0f2632c38b27e1e085c2c4 /drivers/clk/clk-conf.c
parent50595f8b9e78b3c80d341bf9da3e7848d9abbe2a (diff)
downloadop-kernel-dev-306c342f9cb1f573af57a6afd1b3549aa97b9281.zip
op-kernel-dev-306c342f9cb1f573af57a6afd1b3549aa97b9281.tar.gz
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/clk-conf.c')
-rw-r--r--drivers/clk/clk-conf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c
index aad4796..48a65b2 100644
--- a/drivers/clk/clk-conf.c
+++ b/drivers/clk/clk-conf.c
@@ -13,7 +13,6 @@
#include <linux/device.h>
#include <linux/of.h>
#include <linux/printk.h>
-#include "clk.h"
static int __set_clk_parents(struct device_node *node, bool clk_supplier)
{
@@ -39,7 +38,7 @@ static int __set_clk_parents(struct device_node *node, bool clk_supplier)
}
if (clkspec.np == node && !clk_supplier)
return 0;
- pclk = of_clk_get_by_clkspec(&clkspec);
+ pclk = of_clk_get_from_provider(&clkspec);
if (IS_ERR(pclk)) {
pr_warn("clk: couldn't get parent clock %d for %s\n",
index, node->full_name);
@@ -54,7 +53,7 @@ static int __set_clk_parents(struct device_node *node, bool clk_supplier)
rc = 0;
goto err;
}
- clk = of_clk_get_by_clkspec(&clkspec);
+ clk = of_clk_get_from_provider(&clkspec);
if (IS_ERR(clk)) {
pr_warn("clk: couldn't get parent clock %d for %s\n",
index, node->full_name);
@@ -98,7 +97,7 @@ static int __set_clk_rates(struct device_node *node, bool clk_supplier)
if (clkspec.np == node && !clk_supplier)
return 0;
- clk = of_clk_get_by_clkspec(&clkspec);
+ clk = of_clk_get_from_provider(&clkspec);
if (IS_ERR(clk)) {
pr_warn("clk: couldn't get clock %d for %s\n",
index, node->full_name);
OpenPOWER on IntegriCloud