@@ -387,7 +387,7 @@ int __init mx6q_clocks_init(void)
pr_err("i.MX6q clk %d: register failed with %ld\n",
i, PTR_ERR(clk[i]));
- of_clk_add_provider(np, of_clk_src_onecell_get, NULL);
+ of_clk_add_provider(np, of_clk_src_onecell_get, clk);
clk_register_clkdev(clk[gpt_ipg], "ipg", "imx-gpt.0");
clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0");
@@ -1584,16 +1584,10 @@ EXPORT_SYMBOL_GPL(of_clk_src_simple_get);
struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data)
{
- const char *clk_name;
+ struct clk **clks = data;
int idx = clkspec->args[0];
- int ret;
-
- ret = of_property_read_string_index(clkspec->np, "clock-output-names",
- idx, &clk_name);
- if (ret < 0)
- return ERR_PTR(ret);
- return __clk_lookup(clk_name);
+ return clks[idx];
}
EXPORT_SYMBOL_GPL(of_clk_src_onecell_get);